Weathermap standalone install and config

Weathermap standalone install and config

150 150 Roderick Derks

Install Weathermap

cd /tmp

wget http://www.network-weathermap.com/files/php-weathermap-0.97a.zip

unzip php-weathermap-0.97a.zip
mv weathermap /usr/local
cd /usr/local/weathermap/
chown -R apache:apache *
chmod u+w ./configs
mv editor-config.php-dist editor-config.php

cd /etc/httpd/conf.d/
vi weathermap.conf

# php-weathermap-0.9
# PHP-WEATHERMAP : A php writen network weathermap graphing tool
#
Alias /weathermap “/usr/local/weathermap”

<Directory “/usr/local/weathermap”>
    #Order Deny,Allow Deny from all
    # Allow from (ip address allowed) (take care, you must remove # to make this line readable)
    Allow from 127.0.0.1
</Directory>

The weathermap config file

# 360viewpoint config file
# RRD 20120629

HTMLOUTPUTFILE /usr/local/weathermap/360viewpoint.html
IMAGEOUTPUTFILE /usr/local/weathermap/360viewpoint.png
IMAGEURI http://360viewpoint.r71.nl/weathermap/360viewpoint.png

TITLE Network Overview 360Viewpoint
TITLEPOS 10 10
HTMLSTYLE overlib
KEYPOS 10 400

LINK DEFAULT
        BANDWIDTH 100M
        BWLABEL bits
        #BWFONT 100
        OVERLIBWIDTH 395
        OVERLIBHEIGHT 153
        WIDTH 4

# End of global section

# TEMPLATE-only NODEs:
NODE DEFAULT
        LABEL {node:this:name}
        MAXVALUE 100
        USESCALE none

# TEMPLATE-only LINKs:
LINK DEFAULT
        BANDWIDTH 100M

# regular NODEs:
NODE Internet
        TEMPLATE DEFAULT
        ICON images/Cloud-Filled.png
        INFOURL http://www.google.nl
        POSITION 500 200

NODE Router01
        TEMPLATE DEFAULT
        ICON images/Router.png
        INFOURL https://10.0.1.254
        POSITION 100 200

NODE Router01_inBandwith
        LABEL {node:this:inBandwidth:%} bandwith in
        TARGET gauge:/var/lib/centreon/metrics/193.rrd:inBandwidth:-
        USESCALE none in
        LABELBGCOLOR none
        LABELOUTLINECOLOR none
        POSITION Router01 70 -20

# regular LINKs:
LINK Internet-Router01
        TARGET gauge:/var/lib/centreon/metrics/193.rrd:inBandwidth:- gauge:/var/lib/centreon/metrics/194.rrd:-:outBandwidth
        NODES Internet Router01
        BWLABEL unformatted
        # Waardes volgens speedtest: IN 2000Kb OUT 80Kb (ongeveer)
        BANDWIDTH 2K 0.08K
        #MAXVALUE 2K 0.08K
        INBWFORMAT {link:this:bandwidth_in:%0.2f}Kb/sec
        OUTBWFORMAT {link:this:bandwidth_out:%0.2f}Kb/sec
        #OVERLIBGRAPH http://360viewpoint.r71.nl/main.php?p=4&mode=0&svc_id=router01;Network+Usage+Internet

 

Run the command

# php /usr/local/weathermap/weathermap --config /usr/local/weathermap/configs/360viewpoint

Which RRD file is used by a service

# mysql -uroot -p centstorage
mysql> SELECT id FROM index_data WHERE host_name = "router01" AND service_description = "Network Usage Internet";
+----+
| id |
+----+
| 74 |
+----+
1 row in set (0.00 sec)

mysql> select * from metrics where index_id = '74' +-----------+----------+--------------+------------------+-----------+------+------+--------+------+------+--------+ | metric_id | index_id | metric_name  | data_source_type | unit_name | warn | crit | hidden | min  | max  | locked | +-----------+----------+--------------+------------------+-----------+------+------+--------+------+------+--------+ |       195 |       74 | inAbsolut    | 0                |           |    0 |    0 | 1      |    0 |    0 | NULL   | |       193 |       74 | inBandwidth  | 0                | KBs       |    0 |    0 | 0      |    0 |    0 | NULL   | |       191 |       74 | inUsage      | 0                | %         |   85 |   98 | 0      |    0 |    0 | NULL   | |       196 |       74 | outAbsolut   | 0                |           |    0 |    0 | 1      |    0 |    0 | NULL   | |       194 |       74 | outBandwidth | 0                | KBs       |    0 |    0 | 0      |    0 |    0 | NULL   | |       192 |       74 | outUsage     | 0                | %         |   85 |   98 | 0      |    0 |    0 | NULL   | +-----------+----------+--------------+------------------+-----------+------+------+--------+------+------+--------+ 6 rows in set (0.00 sec) 

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

Your Name (required)

Your Email (required)

Subject

Your Message

Your Name (required)

Your Email (required)

Subject

Your Message