Those expressions are different.
I suspect you have two alerts with the same name. Try "grep alert:
xxx-winserver-rules.yml"
On Thursday 11 January 2024 at 04:36:59 UTC Jason wrote:
> Hi
>
> Happy 2024 to all
>
> I get this error with "promtool check config"
>
>
> Checking xxx-winserver-rules.yml
> FAILED:
> lint error 1 duplicate rule(s) found.
>
>
> Those are my rules
>
>
>
>
>
>
> grep expr xxx-winserver-rules.yml
> expr: 100 - (avg by (instance)
> (rate(windows_cpu_time_total{mode="idle",app="MyAppName"}[2m])) * 100) > 80
> expr: 100 - 100 *
> ((windows_logical_disk_free_bytes{app="MyAppName", volume!="C:"} / 1024
> / 1024) / (windows_logical_disk_size_bytes{app="MyAppName",
> volume!="C:"} / 1024 / 1024)) > 70
> expr: 100 -
> ((windows_os_physical_memory_free_bytes{app="MyAppName"} /
> windows_cs_physical_memory_bytes{app="MyAppName"}) * 100) > 90
> expr: windows_service_state{app="MyAppName",
> name=~"tomcat10.+|otcs.+", state!~"running"} == 1
> expr: windows_service_status{app="MyAppName", name="w3svc",
> status="ok", webserver="IIS"} != 1
> expr: windows_service_status{app="MyAppName",
> component="MyComponentName3", name="vendor5 monitoring agent",
> status="ok"} != 1
> expr:
> windows_service_state{app="MyAppName",component="MyComponentName",name="spawner",state="running"}
>
>
> != 1
> expr:
> windows_service_state{app="MyAppName",component="MyComponentName",name="tomcat9",state="running"}
>
>
> != 1
>
>
>
>
>
> I suspect this maybe the issue?
>
> Are those 2 lines the problem? How-To re-write better?
>
> expr:
> windows_service_state{app="MyAppName",component="MyComponentName",name="spawner",state="running"}
>
>
> != 1
> expr:
> windows_service_state{app="MyAppName",component="MyComponentName",name="tomcat9",state="running"}
>
>
> != 1
>
> kind regards
> Jason
>
--
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/bd47f2af-3088-4326-837a-31c431a7f030n%40googlegroups.com.