Skip to content
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

Merged
merged 6 commits into from
Jul 24, 2024
Merged

Add SNMPRestarted alert #1279

merged 6 commits into from
Jul 24, 2024

Conversation

mshahzeb
Copy link
Contributor

Adds an alert to detect SNMP restart.

@mshahzeb mshahzeb requested a review from a team as a code owner July 11, 2024 23:24
@v-zhuravlev
Copy link
Contributor

I would increase it to 300 as you might miss that small uptime, due to scrape frequency (once in a minute?)

alert: 'SNMPRestarted',
expr: 'sysUpTime < 60',
labels: {
severity: 'warning',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

summary: 'SNMP Target Restarted',
description: 'The SNMP target on instance {{$labels.instance}} from job {{$labels.job}} has restarted (sysUpTime < 60 seconds).',
},
'for': '1m',
Copy link
Contributor

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.

Copy link
Contributor Author

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

severity: 'warning',
},
annotations: {
summary: 'SNMP Target Restarted',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
summary: 'SNMP Target Restarted',
summary: 'SNMP target restarted',

according to our style guide.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected

@mshahzeb mshahzeb requested a review from v-zhuravlev July 22, 2024 23:43
@mshahzeb mshahzeb merged commit 6c356d7 into master Jul 24, 2024
3 checks passed
@mshahzeb mshahzeb deleted the shahzeb/add-alerts-snmp branch July 24, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants