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.
I wanted to make like below , I know it won’t work because of this line ‘cat /usr/serverstate = MASTER’ but I wanted to know if there is any way to make it happened? The logic is to have warning only after the string on this file is “Master”
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 ]