I don't know what you mean by "wrong alerts", but I use the following:

      - alert: rebootNode
        expr: node_boot_time_seconds > (node_boot_time_seconds offset 5m + 
5)
        labels:
          severity: warning
        annotations:
          summary: 'Device rebooted at {{ $value | humanizeTimestamp }}'

On Wednesday, 27 April 2022 at 15:43:20 UTC+2 [email protected] wrote:

> Hello,
>
> I would like to monitor reboot of the server, when server reboots need to 
> send alert via alertmanager.
>
> Currently I am using following expression 
> expr: rate(node_boot_time{job="kubernetes-service-endpoints"} [1h])* 
> on(instance) group_left(nodename) 
> group(node_uname_info{})by(instance,nodename)>0 or
>
> rate(node_boot_time{job="kubernetes-service-endpoints"} [1h])>0
>
> But I can see wrong alerts are keep populating in my mail box.
>
> Could you please provide me expression we can use other than what I had 
> used.
>
> Thanks
> DV
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/e5dbc0b4-452e-44ec-b1ed-dfb27e73b88bn%40googlegroups.com.

Reply via email to