maksim-paskal / aks-node-termination-handler

Gracefully handle Azure Virtual Machines shutdown within Kubernetes
Apache License 2.0
39 stars 9 forks source link

feature: Eviction notification to Prometheus server #12

Closed muthusamymm closed 2 years ago

muthusamymm commented 2 years ago

Any plans to add eviction event notification to Prometheus Server.

maksim-paskal commented 2 years ago

Hi @muthusamymm

I will try to implement this feature in next release

muthusamymm commented 2 years ago

Thank you for considering my request,

Thanks, Muthu

On Wed, 1 Dec, 2021, 12:39 pm Maksim Paskal, @.***> wrote:

Hi @muthusamymm https://github.com/muthusamymm

I will try to implement this feature in next release

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maksim-paskal/aks-node-termination-handler/issues/12#issuecomment-983352903, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJT43NUNLAJQDSL5AOSXNC3UOXCZLANCNFSM5JDRPXDA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

maksim-paskal commented 2 years ago

@muthusamymm standart way to push metrics to Prometheus - is using https://github.com/prometheus/pushgateway

To resolve you issue you need to install pushgateway to your infrastucture and with next release you need to install aks-node-termination-handler with new arguments

-webhook.url=http://prometheus-pushgateway.prometheus.svc.cluster.local:9091/metrics/job/aks-node-termination-handler 
-webhook.template='node_termination_event{node="{{ .Node }}"} 1'

where -webhook.url is url to pushgateway endpoint and -webhook.template is template for building a message - you can use for templating {{ .Node }} or any information about event {{ .Event.EventId }} more information about event information here https://docs.microsoft.com/en-us/azure/virtual-machines/linux/scheduled-events

Is it OK to you?

muthusamymm commented 2 years ago

hi Maksim Paskal,

This is really good and yes it will solve the problem . I will integrate pushgateway and let me know once this new release is available .

thanks, Muthu

On Wed, 1 Dec 2021 at 15:23, Maksim Paskal @.***> wrote:

@muthusamymm https://github.com/muthusamymm standart way to push metrics to Prometheus - is using https://github.com/prometheus/pushgateway

To resolve you issue you need to install pushgateway to your infrastucture and with next release you need to install aks-node-termination-handler with new arguments

-webhook.url=http://prometheus-pushgateway.prometheus.svc.cluster.local:9091/metrics/job/aks-node-termination-handler -webhook.template='node_termination_event{node="{{ .Node }}"} 1'

where -webhook.url is url to pushgateway endpoint and -webhook.template is template for building a message - you can use for templating {{ .Node }} or any information about event {{ .Event.EventId }} more information about event information here https://docs.microsoft.com/en-us/azure/virtual-machines/linux/scheduled-events

Is it OK to you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maksim-paskal/aks-node-termination-handler/issues/12#issuecomment-983471272, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJT43NSP6D5ALR2QTX2BY5LUOXWABANCNFSM5JDRPXDA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

maksim-paskal commented 2 years ago

this feature released

Update or install your current installation

helm repo add aks-node-termination-handler https://maksim-paskal.github.io/aks-node-termination-handler/
helm repo update

helm upgrade aks-node-termination-handler \
--install \
--create-namespace \
--namespace aks-node-termination-handler \
aks-node-termination-handler/aks-node-termination-handler \
--set args[0]=-webhook.url=https://hooks.slack.com/services/ID/ID/ID \
--set args[1]=-telegram.token=<telegram token> \
--set args[2]=-telegram.chatID=<telegram chatid> \
--set args[3]=-webhook.url=http://prometheus-pushgateway.prometheus.svc.cluster.local:9091/metrics/job/aks-node-termination-handler \
--set args[4]=-webhook.template='node_termination_event{node="{{ .Node }}"} 1'
muthusamymm commented 2 years ago

Thank you Maksim Paskal for quick support. Validated it, works good .

Thanks, Muthu

On Wed, 1 Dec, 2021, 5:50 pm Maksim Paskal, @.***> wrote:

this feature released

Update or install your current installation

helm repo add aks-node-termination-handler https://maksim-paskal.github.io/aks-node-termination-handler/ helm repo update

helm upgrade aks-node-termination-handler \ --install \ --create-namespace \ --namespace aks-node-termination-handler \ aks-node-termination-handler/aks-node-termination-handler \ --set args[0]=-webhook.url=https://hooks.slack.com/services/ID/ID/ID \ --set args[1]=-telegram.token= \ --set args[2]=-telegram.chatID= \ --set args[3]=-webhook.url=http://prometheus-pushgateway.prometheus.svc.cluster.local:9091/metrics/job/aks-node-termination-handler \ --set args[4]=-webhook.template='node_termination_event{node="{{ .Node }}"} 1'

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maksim-paskal/aks-node-termination-handler/issues/12#issuecomment-983588312, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJT43NUIL3XF5WXUM6P3US3UOYHJZANCNFSM5JDRPXDA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.