-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add SNMPRestarted alert #1279
Add SNMPRestarted alert #1279
Conversation
I would increase it to 300 as you might miss that small uptime, due to scrape frequency (once in a minute?) |
snmp-mixin/alerts/alerts.libsonnet
Outdated
alert: 'SNMPRestarted', | ||
expr: 'sysUpTime < 60', | ||
labels: { | ||
severity: 'warning', |
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.
severity: 'warning', | |
severity: 'warning', |
I would set it to info, as you don't know if restart is planned or not. Also, boot from power off state would also fire it, I would set it to info.
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
snmp-mixin/alerts/alerts.libsonnet
Outdated
summary: 'SNMP Target Restarted', | ||
description: 'The SNMP target on instance {{$labels.instance}} from job {{$labels.job}} has restarted (sysUpTime < 60 seconds).', | ||
}, | ||
'for': '1m', |
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 not sure if there is a point waiting here.
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.
Havent completely removed it - added a 5s wait instead
snmp-mixin/alerts/alerts.libsonnet
Outdated
severity: 'warning', | ||
}, | ||
annotations: { | ||
summary: 'SNMP Target Restarted', |
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.
summary: 'SNMP Target Restarted', | |
summary: 'SNMP target restarted', |
according to our style guide.
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.
Corrected
Adds an alert to detect SNMP restart.