I found a way to create a ssh-session to a host that is listed on the trigger status page in zabbix:
- First, your client PC has to know how to handle URLs beginning with "ssh:":
As i have a windows PC, i needed to add some entries to my registry (see attached reg-file). I use putty to connect to my servers, so i wrote a batchfile that modifies the URL and calls putty to connect to the machine. It is searched in "C:\", edit the reg-file if you want it somewhere else. The batchfile expects putty in "D:\putty\", change it to match your location.
If it works, you can type "ssh:username@server" in your explorer/browser and putty pops up and asks you for your password.
Linux (and MAC) client users might get help here: http://kb.mozillazine.org/Register_p...#Linux_and_Mac
- Next, i patched the zabbix interface to provide links to the listed hosts in tr_status (see attachment):
now, every line in tr_status begins with a link "[SSH]", which you can click to open the session.
The hostname itself was not a link before. I made one out of it, bringing you to the "latest data" page for that host.
Here the Files:
Windows Registry File: http://www.heiwu.de/myfiles/SSH-Protokoll.reg
Batchfile: http://www.heiwu.de/myfiles/startsession.bat
zabbix frontend patch: http://www.heiwu.de/myfiles/ssh-session_v144.patch (changed 2 lines)
Note this is made for Zabbix V1.4.4. I made a short diff between tr_status.php on 1.4.5 and 1.4.4 which didn't bring up any differences, so the patch should work vor 1.4.5, too. Maybe... :P
This is tested on 2 PCs.
Now, Feedback welcome!
- First, your client PC has to know how to handle URLs beginning with "ssh:":
As i have a windows PC, i needed to add some entries to my registry (see attached reg-file). I use putty to connect to my servers, so i wrote a batchfile that modifies the URL and calls putty to connect to the machine. It is searched in "C:\", edit the reg-file if you want it somewhere else. The batchfile expects putty in "D:\putty\", change it to match your location.
If it works, you can type "ssh:username@server" in your explorer/browser and putty pops up and asks you for your password.
Linux (and MAC) client users might get help here: http://kb.mozillazine.org/Register_p...#Linux_and_Mac
- Next, i patched the zabbix interface to provide links to the listed hosts in tr_status (see attachment):
now, every line in tr_status begins with a link "[SSH]", which you can click to open the session.
The hostname itself was not a link before. I made one out of it, bringing you to the "latest data" page for that host.
Here the Files:
Windows Registry File: http://www.heiwu.de/myfiles/SSH-Protokoll.reg
Batchfile: http://www.heiwu.de/myfiles/startsession.bat
zabbix frontend patch: http://www.heiwu.de/myfiles/ssh-session_v144.patch (changed 2 lines)
Note this is made for Zabbix V1.4.4. I made a short diff between tr_status.php on 1.4.5 and 1.4.4 which didn't bring up any differences, so the patch should work vor 1.4.5, too. Maybe... :P
This is tested on 2 PCs.
Now, Feedback welcome!

