Hello,
I'm working on an API call that would check with zabbix to see if there are any active alerts, currently. This would be integrated into a procedure that would check for zabbix alerts before letting it proceed. I have most of the script written, even nicely stripped down to just return a number, since all i need is a count. However, the timestamp is tripping me up. Without a timeframe it returns every event since the beginning of time, so I have to put in 2 unix timestamps to narrow it down. Problem is, this needs to be an automatic thing that checks at any given point in time if Zabbix has current alerts, if > 0 halt, if 0 then we're good...
Any ideas on how to just snapshot "right now" with event.get?
I attached what I got so far, minus the security stuff
I'm working on an API call that would check with zabbix to see if there are any active alerts, currently. This would be integrated into a procedure that would check for zabbix alerts before letting it proceed. I have most of the script written, even nicely stripped down to just return a number, since all i need is a count. However, the timestamp is tripping me up. Without a timeframe it returns every event since the beginning of time, so I have to put in 2 unix timestamps to narrow it down. Problem is, this needs to be an automatic thing that checks at any given point in time if Zabbix has current alerts, if > 0 halt, if 0 then we're good...
Any ideas on how to just snapshot "right now" with event.get?
I attached what I got so far, minus the security stuff