satu

Gajah mati meninggalkan tulang
harimau mati meninggalkan belang
manusia mati meninggalkan nama

persiapkan klu kalian mati ingin meninggalkan apa ?

Tuesday 19 January 2016

wheatermap zabbix

https://www.zabbix.com/forum/showthread.php?t=9873&page=2


I've started playing around with it and after some tinkering, I have a working weathermap. This adds an excellent visualization tool to ZABBIX, especially for complex networks.

A very quick HOWTO:

1) Install php-weathermap somewhere.
2) Read the fine manual
3) Create a weathermap of the hosts you want to monitor.
4) Configure WeatherMapDataSource_zabbix.php (and put it in the right place at weathermap/lib/datasources - not in the ZABBIX directory).
5) To get the id's of the Items to put in the map, I've named all my traffic Items "Traffic..." so I ran the following MySQL query:

SELECT * FROM items i where description LIKE 'Traffic%';

this gets me the itemid I need to put into the weathermap configuration file. Note that I got error messages around lines 44 and 45 of the php file because my root MySQL user has a password. I guess these are for debugging purposes. I've also hardcoded the host, username and password of the database at around line 52 and hardcoded the datbase name at line 54. The variables didn't seem to work. Also note that the Items must be Integers or the script won't work.

6) Create the weathermap using "php ./weathermap --config mymap.conf"
7) Enjoy
8) If you want your map to auto-update itself, create a cron job or a Windows Scheduled Task to run the command at step 6)





 Quickly the SQL syntax to get itemid with the hostname and the description field to make the itemid search easier

SELECT hosts.host, items.description, items.itemid
FROM items, hosts WHERE items.hostid = hosts.hostid AND hosts.host LIKE '%PATTERN%' 

No comments:

Post a Comment