Weathermap, cacti и juniper

Еще одна заметка-напоминалка.
Приведу конфигурацию для отображения параметров juniper mx в weathermap. Вот что в итоге получится:
 

juniper weathermap

В конфигурации указана только графическая часть, часть отвечающую за съем и хранение параметров я опущу, т.к. ничего сложного в этом этапе нет. Используемые изображения расположены по этой ссылке - https://nklug.org.ua/files/weatherjun.tar.gz. В данной конфигурации отображаются: состояния интерфейсов, источников питания, уведомление об авариях и информационное табло с общей информацией (температура,загрузка процессора, памяти и результаты пинга до маршрутизатора)

Сам конфигурационный файл. Размещаем его в директории configs плагина weathermap
cat ./juniper.conf  
# Automatically generated by php-weathermap v0.97c
FONTDEFINE 100 docs/example/DejaVuSans.ttf 8
FONTDEFINE 10 docs/example/DejaVuSans.ttf 7
FONTDEFINE 11 docs/example/digital-mono.ttf 12

BACKGROUND images/net4.png
WIDTH 1400
HEIGHT 1024
HTMLSTYLE overlib
KEYFONT 10
TITLE BGP PEERS
TIMEPOS 1123 14 Created: %b %d %Y %H:%M:%S

KEYPOS DEFAULT 1295 1 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0    0    192 192 192   
SCALE DEFAULT 0    1    255 255 255   
SCALE DEFAULT 1    10   140   0 255   
SCALE DEFAULT 10   25    32  32 255   
SCALE DEFAULT 25   40     0 192 255   
SCALE DEFAULT 40   55     0 240   0   
SCALE DEFAULT 55   70   240 240   0   
SCALE DEFAULT 70   85   255 192   0   
SCALE DEFAULT 85   100  255   0   0   

SCALE ifstatus 5.5  6.5    0 255   0  images/Cloud-Filled_g.png
SCALE ifstatus 1.5  5.5  255   0   0  images/Cloud-Filled_r.png
SCALE ifstatus 0    0.5  255   0   0  images/Cloud-Filled_r.png

SCALE power 5.5  6.5  255   0   0  images/p_off.png
SCALE power 1.5  5.5  255   0   0  images/p_off.png
SCALE power 0    1.5    0 255   0  images/p_on.png

SCALE powerl 5.5  6.5  255   0   0   
SCALE powerl 1.5  5.5  255   0   0   
SCALE powerl 0    1.5    0 255   0  images/pl_g.png

SCALE port 5.5  6.5  255   0   0  images/xe_r.png
SCALE port 1.5  5.5  255   0   0  images/xe_r.png
SCALE port 0    1.5    0 255   0  images/xe_g.png

SCALE portg11 5.5  6.5  255   0   0  images/ge_r.png
SCALE portg11 1.5  5.5  255   0   0  images/ge_r.png
SCALE portg11 0    1.5    0 255   0  images/ge_g.png

SCALE portg10 5.5  6.5  255   0   0  images/ge11_r.png
SCALE portg10 1.5  5.5  255   0   0  images/ge11_r.png
SCALE portg10 0    1.5    0 255   0  images/ge11_g.png

SCALE alarm 5.5  6.5  255   0   0  images/alarm_r.png
SCALE alarm 2.5  5.5  255   0   0  images/alarm_r.png
SCALE alarm 0    2.5    0 255   0  images/alarm_g.png

SCALE alarmy 5.5  6.5  255   0   0  images/triangle_y.png
SCALE alarmy 2.5  5.5  255   0   0  images/triangle_y.png
SCALE alarmy 0    2.5    0 255   0  images/triangle_b.png

SCALE grey 0    100   68  72  74   

SET rrd_use_poller_output 1

# End of global section


# TEMPLATE-only NODEs:
NODE DEFAULT
       LABELFONT 10
       MAXVALUE 100


# TEMPLATE-only LINKs:
LINK DEFAULT
       WIDTH 3
       ARROWSTYLE compact
       VIASTYLE angled
       BWFONT 10
       COMMENTFONT 10
       BWBOXCOLOR 209 223 240
       COMMENTFONTCOLOR 0 0 0
       BWLABEL bits
       BANDWIDTH 1000M


# regular NODEs:
NODE node08638
       INFOURL /cacti/graph.php?rra_id=all&local_graph_id=1271
       OVERLIBGRAPH /cacti/local_graph_id=1271
       ICON images/mx80.png
       POSITION 840 150

NODE node01987
       LABEL XE-0/0/0
       POSITION 700 250

NODE node03093
       LABEL XE-0/0/3
       POSITION 30 460

NODE node07408
       LABEL XE-0/0/1
       POSITION 430 440

NODE node00771
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_operationalstate_1631.rrd:OperationalState:-
       USESCALE power in percent
       POSITION 584 186

NODE node01200
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_operationalstate_1632.rrd:OperationalState:-
       USESCALE power in percent
       POSITION 714 186

NODE node06440
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1662.rrd:int_status:-
       USESCALE port in percent
       POSITION 922 202

NODE node06621
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1663.rrd:int_status:-
       USESCALE port in percent
       POSITION 979 202

NODE node06679
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1664.rrd:int_status:-
       USESCALE port in percent
       POSITION 1034 202

NODE node06747
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1665.rrd:int_status:-
       USESCALE port in percent
       POSITION 1090 202

NODE node03369
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1676.rrd:int_status:-
       USESCALE portg11 in percent
       POSITION 523 99

NODE node03985
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1677.rrd:int_status:-
       USESCALE portg11 in percent
       POSITION 549 99

NODE node04278
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1678.rrd:int_status:-
       USESCALE portg11 in percent
       POSITION 575 99

NODE node06297
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1679.rrd:int_status:-
       USESCALE portg11 in percent
       POSITION 601 99

NODE node06332
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1680.rrd:int_status:-
       USESCALE portg11 in percent
       POSITION 627 99

NODE node08888
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1681.rrd:int_status:-
       USESCALE portg11 in percent
       POSITION 659 99

NODE node08196
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1682.rrd:int_status:-
       USESCALE portg11 in percent
       POSITION 711 99

NODE node08239
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1683.rrd:int_status:-
       USESCALE portg11 in percent
       POSITION 685 99

NODE node08699
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1684.rrd:int_status:-
       USESCALE portg11 in percent
       POSITION 738 99

NODE node08834
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1685.rrd:int_status:-
       USESCALE portg11 in percent
       POSITION 764 99

NODE node02486
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1666.rrd:int_status:-
       USESCALE portg10 in percent
       POSITION 522 125

NODE node02528
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1667.rrd:int_status:-
       USESCALE portg10 in percent
       POSITION 549 125

NODE node02548
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1668.rrd:int_status:-
       USESCALE portg10 in percent
       POSITION 575 125

NODE node02572
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1669.rrd:int_status:-
       USESCALE portg10 in percent
       POSITION 601 125

NODE node02591
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1670.rrd:int_status:-
       USESCALE portg10 in percent
       POSITION 627 125

NODE node02607
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1671.rrd:int_status:-
       USESCALE portg10 in percent
       POSITION 659 125

NODE node02623
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1672.rrd:int_status:-
       USESCALE portg10 in percent
       POSITION 686 125

NODE node02637
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1673.rrd:int_status:-
       USESCALE portg10 in percent
       POSITION 712 125

NODE node02653
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1674.rrd:int_status:-
       USESCALE portg10 in percent
       POSITION 737 125

NODE node02667
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_int_st1675.rrd:int_status:-
       USESCALE portg10 in percent
       POSITION 763 125

NODE node04420
       LABEL CPU {node:this:inpercent:%d}%
       LABELFONT 11
       LABELOUTLINECOLOR 68 72 74
       LABELBGCOLOR 68 72 74
       LABELFONTCOLOR 255 255 255
       TARGET gauge:/var/lib/cacti/rra/juniper_snmp_oid_1109.rrd:snmp_oid:-
       USESCALE grey in percent
       POSITION 860 97

NODE node05591
       LABEL RAM {node:this:inpercent:%d}%
       LABELFONT 11
       LABELOUTLINECOLOR 68 72 74
       LABELBGCOLOR 68 72 74
       LABELFONTCOLOR 255 255 255
       TARGET gauge:/var/lib/cacti/rra/juniper_utlizedram_1276.rrd:UtlizedRAM:-
       USESCALE grey in percent
       POSITION 860 116

NODE node06032
       LABEL TEMP {node:this:bandwidth_in:%d} C
       LABELFONT 11
       LABELOUTLINECOLOR 68 72 74
       LABELBGCOLOR 68 72 74
       LABELFONTCOLOR 255 255 255
       TARGET gauge:/var/lib/cacti/rra/juniper_temperature_1630.rrd:Temperature:-
       USESCALE grey in percent
       POSITION 1000 120

NODE node04493
       LABEL PING LOSS-{node:this:bandwidth_in:%d}% / AVG-{node:this:bandwidth_out:%d} ms
       LABELFONT 11
       LABELOUTLINECOLOR 68 72 74
       LABELBGCOLOR 68 72 74
       LABELFONTCOLOR 255 255 255
       TARGET gauge:/var/lib/cacti/rra/juniper_loss_410.rrd:loss:avg
       USESCALE grey in percent
       POSITION 1000 98

NODE node00813
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/_9_juniper_-_alarm_snmp_oid_1689.rrd:snmp_oid:-
       USESCALE alarm in percent
       POSITION 751 174

NODE node04314
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/_9_juniper_-_alarm_snmp_oid_1690.rrd:snmp_oid:-
       USESCALE alarmy in percent
       POSITION 761 173

NODE node09692
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_operationalstate_1631.rrd:OperationalState:-
       USESCALE powerl in percent
       POSITION 584 157

NODE node09875
       ICON {node:this:inscaletag}
       TARGET gauge:/var/lib/cacti/rra/juniper_operationalstate_1632.rrd:OperationalState:-
       USESCALE powerl in percent
       POSITION 715 157
 

Данное отображение используется как отправная точка для построения других карт.