-1

I need Zabbix to look at the html from a web page. The page might contain some combination of red, yellow and green gifs, (red.gif, yellow.gif and green.gif). I don't really care about the greens, but if a red or yellow is on the page, I need this to be treated as an error and have it logged accordingly. I've been looking at using the regex item, but its not clear if this will work. Does anyone have any ideas on how I might go about this? Thanks

Lazloman
  • 1,289
  • 5
  • 25
  • 50
  • what do you already try ? – NeronLeVelu Feb 13 '17 at 07:35
  • I've not tried anything yet. I've never used a server monitoring tool before and really have no idea how to go about this. I'm actually a web developer who has had this task thrust upon me. – Lazloman Feb 13 '17 at 15:18

1 Answers1

1

It sounds like you want to alert on the strings "yellow.gif" and "red.gif" being present in the page source. If so, create a web.page.regexp item and filter by those two strings and have a trigger on top of that.

Richlv
  • 3,954
  • 1
  • 17
  • 21
  • Is this something I can have on the Zabbix server, or does this have to be on the client? I ask only because I can't have an agent running on the clients. – Lazloman Feb 13 '17 at 15:20
  • Unfortunately, at this time it's only supported on the Zabbix agent. You could use web scenarios from the server, but there you can only have "required string", not "bad string". If all else fails, an external check that runs `curl` might be your last hope... – Richlv Feb 13 '17 at 18:29