I have some problems with using swap and httpd in servers farm which finaly will be fixed on kernel level. I found temporary solution for my problems .. restart httpd.
All my hosts are managed using template.
I have defined trigger "[vol] [swap] < 50% free" in my Unix_t template.
On all hosts in zabbix agent configuration is enabled remote command execution (EnableRemoteCommands=1) so I can run for example:
$ zabbix_get -s <host> -k 'system.run["/usr/bin/sudo /etc/init.d/httpd restart"]'
It reports "Timeout while executing operation." but it does't matter because above commant is executed correctly.
OK .. lets start to define action:
Configuration -> Actions ->
Action type: Remote command
Source: Trigger
Conditions: "Trigger = "Unix_t: [vol] [swap] < 50% free""
Remote command: "Unix_t:/usr/bin/sudo sudo /etc/init.d/httpd restart"
and I don't see executing above on this trigger.
Qustions:
- what I'm doning wrong in above ?
- how can I change/enlarge remote command execution timeout ?
All my hosts are managed using template.
I have defined trigger "[vol] [swap] < 50% free" in my Unix_t template.
On all hosts in zabbix agent configuration is enabled remote command execution (EnableRemoteCommands=1) so I can run for example:
$ zabbix_get -s <host> -k 'system.run["/usr/bin/sudo /etc/init.d/httpd restart"]'
It reports "Timeout while executing operation." but it does't matter because above commant is executed correctly.
OK .. lets start to define action:
Configuration -> Actions ->
Action type: Remote command
Source: Trigger
Conditions: "Trigger = "Unix_t: [vol] [swap] < 50% free""
Remote command: "Unix_t:/usr/bin/sudo sudo /etc/init.d/httpd restart"
and I don't see executing above on this trigger.
Qustions:
- what I'm doning wrong in above ?
- how can I change/enlarge remote command execution timeout ?
rint:]]*$",$cmd,$cmd_items)){
Comment