Hi everyone, I am a complete newbie to Zabbix with no experience and I am only just learning using it. My current task was to come up with a trigger that would go off once the CPU usage of over 80 % reached 30 minutes in the day. I read through the documentation and came up with
count(/*** host name ***/system.cpu.util,1d,"ge",80)>=30
This trigger works exactly as it should, but it is not exactly what I was asked for. What we need is this: if possible, we need Zabbix to constantly monitor the CPU usage on the host and locally store the data and then an item with a set interval that would read this updated information and based on that update its value. In particular we want to monitor the time when CPU usage is 80 % or more. I would have an item with an update interval of 15 minutes. That would each time read the locally stored data about the length of time when the CPU was utilised over 80 %. So, for example, starting at midnight, the initial value for the day would be 0. Then during the first 15 minutes of the day the CPU utilisation of 80+ % would be 50 seconds, hence after the first update of the Item its value would be 50 seconds. If in the next 15 minutes the 80+ % utilisation was for 30 seconds, the Item's value after the next check would show 1 minute 20 seconds and so on. This value should always reset to zero at midnight. And then based on that I would create a trigger that would go off when this value reached 30 minutes, that should be fairly easy to make, but the first part is the one that I struggle with.
If anyone could tell me whether this is even possible and if so, provide some help, I would be very grateful. Thank you all in advance.
count(/*** host name ***/system.cpu.util,1d,"ge",80)>=30
This trigger works exactly as it should, but it is not exactly what I was asked for. What we need is this: if possible, we need Zabbix to constantly monitor the CPU usage on the host and locally store the data and then an item with a set interval that would read this updated information and based on that update its value. In particular we want to monitor the time when CPU usage is 80 % or more. I would have an item with an update interval of 15 minutes. That would each time read the locally stored data about the length of time when the CPU was utilised over 80 %. So, for example, starting at midnight, the initial value for the day would be 0. Then during the first 15 minutes of the day the CPU utilisation of 80+ % would be 50 seconds, hence after the first update of the Item its value would be 50 seconds. If in the next 15 minutes the 80+ % utilisation was for 30 seconds, the Item's value after the next check would show 1 minute 20 seconds and so on. This value should always reset to zero at midnight. And then based on that I would create a trigger that would go off when this value reached 30 minutes, that should be fairly easy to make, but the first part is the one that I struggle with.
If anyone could tell me whether this is even possible and if so, provide some help, I would be very grateful. Thank you all in advance.
Comment