-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Azure Log Analytics scaler documentation #244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a bunch of first comments but high-level looks fine, thanks!
clientID: "04b4ca0a-82b1-4c0a-bbbb-7946442e805b" | ||
clientSecret: "vU6UtUXls6RNXxv~l6NRi1V8J1fnk5Q-ce" | ||
workspaceID: "81963c40-af2e-47cd-8e72-3002e08aa2af" | ||
query: "let AppName = \"web\";\r\nlet ClusterName = \"demo-cluster\";\r\nlet AvgDuration = ago(10m);\r\nlet ThresholdCoefficient = 0.8;\r\nPerf\r\n| where InstanceName contains AppName\r\n| where InstanceName contains ClusterName\r\n| where CounterName == \"cpuUsageNanoCores\"\r\n| where TimeGenerated > AvgDuration\r\n| extend AppName = substring(InstanceName, indexof((InstanceName), \"/\", 0, -1, 10) + 1)\r\n| summarize MetricValue=round(avg(CounterValue)) by CounterName, AppName\r\n| join (Perf \r\n | where InstanceName contains AppName\r\n | where InstanceName contains ClusterName\r\n | where CounterName == \"cpuLimitNanoCores\"\r\n | where TimeGenerated > AvgDuration\r\n | extend AppName = substring(InstanceName, indexof((InstanceName), \"/\", 0, -1, 10) + 1)\r\n | summarize arg_max(TimeGenerated, *) by AppName, CounterName\r\n | project Limit = CounterValue, TimeGenerated, CounterPath, AppName)\r\n on AppName\r\n| project MetricValue, Threshold = Limit * ThresholdCoefficient" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering - Do we use in-line queries, use config map or mount them on the scaled workload?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts @zroubalik @ahmelsayed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomkerkhove , I used Prometheus Scaler as reference: https://keda.sh/docs/1.5/scalers/prometheus/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense but in this case, they are a bit longer. It's ok for me but just want to verify with the others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can define a multi-line string in yaml using
...
query: |
let AppName = "web";
let ClusterName = "demo-cluster";
let AvgDuration = ago(10m);
let ThresholdCoefficient = 0.8;
Perf
| where InstanceName contains AppName
| where InstanceName contains ClusterName
| where CounterName == "cpuUsageNanoCores"
| where TimeGenerated > AvgDuration
| extend AppName = substring(InstanceName, indexof((InstanceName), "/", 0, -1, 10) + 1)
| summarize MetricValue=round(avg(CounterValue)) by CounterName, AppName
| join (Perf
| where InstanceName contains AppName
| where InstanceName contains ClusterName
| where CounterName == "cpuLimitNanoCores"
| where TimeGenerated > AvgDuration
| extend AppName = substring(InstanceName, indexof((InstanceName), "/", 0, -1, 10) + 1)
| summarize arg_max(TimeGenerated, *) by AppName, CounterName
| project Limit = CounterValue, TimeGenerated, CounterPath, AppName)
on AppName
| project MetricValue, Threshold = Limit * ThresholdCoefficient
which might make it look a bit more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the suggestion!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but allowing others to comment as well.
clientID: "04b4ca0a-82b1-4c0a-bbbb-7946442e805b" | ||
clientSecret: "vU6UtUXls6RNXxv~l6NRi1V8J1fnk5Q-ce" | ||
workspaceID: "81963c40-af2e-47cd-8e72-3002e08aa2af" | ||
query: "let AppName = \"web\";\r\nlet ClusterName = \"demo-cluster\";\r\nlet AvgDuration = ago(10m);\r\nlet ThresholdCoefficient = 0.8;\r\nPerf\r\n| where InstanceName contains AppName\r\n| where InstanceName contains ClusterName\r\n| where CounterName == \"cpuUsageNanoCores\"\r\n| where TimeGenerated > AvgDuration\r\n| extend AppName = substring(InstanceName, indexof((InstanceName), \"/\", 0, -1, 10) + 1)\r\n| summarize MetricValue=round(avg(CounterValue)) by CounterName, AppName\r\n| join (Perf \r\n | where InstanceName contains AppName\r\n | where InstanceName contains ClusterName\r\n | where CounterName == \"cpuLimitNanoCores\"\r\n | where TimeGenerated > AvgDuration\r\n | extend AppName = substring(InstanceName, indexof((InstanceName), \"/\", 0, -1, 10) + 1)\r\n | summarize arg_max(TimeGenerated, *) by AppName, CounterName\r\n | project Limit = CounterValue, TimeGenerated, CounterPath, AppName)\r\n on AppName\r\n| project MetricValue, Threshold = Limit * ThresholdCoefficient" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense but in this case, they are a bit longer. It's ok for me but just want to verify with the others.
LGTM, but want your input on some topics @zroubalik @ahmelsayed . |
@spoplavskiy feel free to add a note to https://github.com/kedacore/keda-docs/blob/master/content/blog/keda-2.0-beta.md.draft#L15 with your new scaler please? Thanks! |
@tomkerkhove , thanks for pointing. Added in last commit. |
@spoplavskiy one last thing, DCO please :) |
And this great suggestion: https://github.com/kedacore/keda-docs/pull/244/files#r486117830 |
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
* Provide 404 Not Found page Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Provide better 404 page Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Missing / Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Tsuyoshi Ushio <ushio@simplearchitect.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Danny Seymour <dseymour@taos.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
@tomkerkhove, Changed query to multiline in last commit |
@tomkerkhove, @zroubalik It looks like command, suggested by DCO tool to sign-off all my commits produced unexpected result :) It it now hard to revert and find in git log all my commits, as many of them was just applying inline suggections. What if we finish reviewing this PR, and I will close this and open a new one by forking last version and applying my changes in single signed commit? Is that OK? |
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
…screenshot Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
Signed-off-by: Sergiy Poplavskyi <spopla@microsoft.com>
That's certainly ok for me @spoplavskiy, sorry for only noticing now! |
@tomkerkhove , I have created a new PR: #250 |
Signed-off-by: Sergiy Poplavskyi spopla@microsoft.com
Relates to kedacore/keda#1061