I have defined a new media to call a script (used to send SMS texts).
1. Zabbix server config
First I modified my zabbix_server.conf and changed the default location for the scripts:
I then restarted the server. In this directory I have a Perl script called "sendsms" that takes the parameters passed to it and uses that to send a text message by SMS through a web-based provider.
The script works fine and only uses absolute paths.
2. Front-end config
I went to 'Administration' - 'Media Types' and then "Create Media Type".
I then created it by defining it as a Type 'Script' and ScriptName 'sendsms'
After that I went to 'Users' and selected my own user. There is already a Media there (Email) that works just fine. I added a new one and put my username in the field "Send to". The new Media shows as created and enabled properly.
At this stage I was assuming that everything was in order. The server config points to the right directory, the script is correctly written with proper permissions, the front-end has been configured correctly.
Time for a test. I kill the zabbix-agentd on one monitored server. The alarm shows on the Dashboard, and I receive an email alert. The SMS script is however never called.
I put the server in debug mode (4) and tried again - no useful information in the logs.
At this stage I don't know what else to try.
Using Zabbix 1.8.3 on Linux Ubuntu 10.04 with MySQL 5.1
1. Zabbix server config
First I modified my zabbix_server.conf and changed the default location for the scripts:
Code:
AlertScriptsPath=/opt/zabbix/scripts
The script works fine and only uses absolute paths.
2. Front-end config
I went to 'Administration' - 'Media Types' and then "Create Media Type".
I then created it by defining it as a Type 'Script' and ScriptName 'sendsms'
After that I went to 'Users' and selected my own user. There is already a Media there (Email) that works just fine. I added a new one and put my username in the field "Send to". The new Media shows as created and enabled properly.
At this stage I was assuming that everything was in order. The server config points to the right directory, the script is correctly written with proper permissions, the front-end has been configured correctly.
Time for a test. I kill the zabbix-agentd on one monitored server. The alarm shows on the Dashboard, and I receive an email alert. The SMS script is however never called.
I put the server in debug mode (4) and tried again - no useful information in the logs.
At this stage I don't know what else to try.
Using Zabbix 1.8.3 on Linux Ubuntu 10.04 with MySQL 5.1
?
Comment