Alert only based on specific "string" in a text file. #13898
Replies: 1 comment 2 replies
-
I think you could make a copy of the @cakrit i recall a user asking something similar a while ago in the community i think - can you remember? Another option could be to make a collector to check the value of the file at regular time intervals and map the file contents to a state number like 0,1,2 etc and then you'd maybe be able to create 2 alert configs - one for the app.processes like above and another depending on the state of the number 0,1,2. This example shows combining two alerts, so thinking maybe something similar: https://learn.netdata.cloud/docs/agent/health/reference#example-7---z-score-based-alarm I had a look but dont think the But if you could have it be something like file |
Beta Was this translation helpful? Give feedback.
-
Is it possible to have a lookup or warn/crit based on a string inside a file?
We have a MASTER-BACKUP condition, so we only want to monitor services when the server is in a master state.
alarm: maptool_processes
on: apps.processes
lookup: min -5s match-names of maptool_tassta
every: 5s
crit: $this != nan AND $this = 0 AND cat /usr/serverstate = MASTER
units: processes
info: maptool on master server currently is out of process [down / fail ]
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions