====== Nagiosgraph - Konfiguration ====== Um die Graphen von Nagiosgraph etwas optisch ansprechender zu gestalten, sind folgende Konfigurationen sinnvoll. ===== nagiosgraph.conf ===== In der ''nagiosgraph.conf'' sollte das rrdoptsfile konfiguriert werden, um Service-bezogen zusätzliche RRD-Optionen konfigurieren zu können. Außerdem wird definiert, welche Werte als AREA dargestellt werden. Darüber hinaus kann für einzelne Service mit "lineformat" eine spezielle Darstellung (abweichend vom Default) gewählt werden. # ... vi /usr/local/nagiosgraph/etc/nagiosgraph.conf # ... rrdoptsfile=/usr/local/nagiosgraph/etc/rrdopts.conf # ... plotasAREA = idle,data;system,data;user,data;nice,data;cpu_prct_used,data;storagesize,data;storageused,data # ... lineformat = warn=LINE1,D0D050;crit=LINE1,D05050;storagesize,data=AREA,AFECEDcc;storageused,data=AREA,2175D9dd;result,data=AREA,FF7D00aa # ... Eine erweiterte 'lineformat' Konfiguration sieht dann wie folgt aus: # ... vi /usr/local/nagiosgraph/etc/nagiosgraph.conf # ... lineformat = warn=LINE1,D0D050;crit=LINE1,D05050;storagesize,data=AREA,AFECEDcc; storageused,data=AREA,2175D9dd;result,data=AREA,FF7D00aa;centera_capacity,max=AREA,AFECEDcc; centera_capacity,data=AREA,2175D9dd;datastore_usage,data=AREA,2175D9ff;datastore_usage,max=AREA,AFECEDaa; signalquality,data=LINE2,2211A0cc;NUMSVCWARN,data=AREA,FFFF00dd,STACK;NUMSVCCRIT,data=AREA,FF0000dd,STACK; NUMSVCUNKN,data=AREA,FFAB00dd,STACK;NUMHSTCHECKED,data=LINE2,002A8Fcc;NUMSVCCHECKED,data=AREA,96E78Add; NUMSVCPSVCHK5M,data=AREA,77AAEEcc;vnxreadio,data=AREA,87cefacc,STACK;vnxwriteio,data=AREA,00008Bcc,STACK; ISIdiskused,max=AREA,AFECEDcc;ISIdiskused,data=AREA,2175D9dd;ISInetin,data=AREA,00CF00cc; ISInetout,data=AREA,002A97cc # ... ===== datasetdb.conf ===== In der ''datasetdb.conf'' werden die Datenquellen konfiguiert. Hier kann dann auch "entschieden" werden, ob alle perfdata-Werte zur Anzeige kommen - und in welcher Reihenfolge (bei plotasAREA wichtig). Dies ist natürlich abhängig von den perdata-Werten und damit von die Plugins, die die Werte liefern. # ... vi /usr/local/nagiosgraph/etc/datasetdb.conf # ... # - check_disk.pl service=Disk_C&db=storagesize,data&db=storageused,data&db=storageused,crit&db=storageused,warn # - check_emc_dd.pl service=DD CPU&db=DDcpu,data&db=DDcpu,warn&db=DDcpu,crit service=DD Compression Factor&db=DDcomp7d,data&db=DDcomp7d,warn&db=DDcomp7d,crit&db=DDcomp24h,data service=DD Disk Usage&db=DDdiskused,max&db=DDdiskused,data&db=DDdiskused,warn&db=DDdiskused,crit service=DD Filesystem Available&db=DDfsavail,data&db=DDfsavail,warn&db=DDfsavail,crit service=DD Ops CIFS&db=DDcifsOps,data&db=DDcifsOps,warn&db=DDcifsOps,crit service=DD Ops NFS&db=DDnfsOps,data&db=DDnfsOps,warn&db=DDnfsOps,crit service=DD MTree: backup&db=DDmtreeGBtotal,data&db=DDmtreeGBtotal,warn&db=DDmtreeGBtotal,crit&db=DDmtreeGB24h,data&db=DDmtreeGB7d # ... ===== labels.conf ===== Für sprechendere Anzeigen in der Graph-Legende können entsprechende Einträge in der ''labels.conf'' gemacht werden. #vi /usr/local/nagiosgraph/etc/labels.conf # ... # - loghost2nagios.pl Laufzeit,data=Verarbeitungszeit Loghost # - check_snmp_load.pl LoadAVG,load1= 1min AVG LoadAVG,load5= 5min AVG LoadAVG,load15=15min AVG # - check_disk.pl storagesize,data=Speicher gesamt storageused,data=Speicher genutzt # - check_emc_dd.pl DDcpu,data=DD CPU Usage (%) DDcomp7d,data=DD Compression Factor (last 7d) DDcomp24h,data=DD Compression Factor (last 24h) DDdiskused,data=DD Disk Usage DDfsavail,data=DD Filesystem Available DDcifsOps,data=DD Ops CIFS DDnfsOps,data=DD Ops NFS DDReplReceivedBytes,data=DD Replication Received Bytes DDReplSentBytes,data=DD Replication Sent Bytes DDReplSentBytesPrecomp,data=DD Replication Sent Bytes PreCompress DDmtreeGBtotal,data=DD MTree GB PreComp (total) DDmtreeGB24h,data=DD MTree GB PreComp (last 24h) DDmtreeGB7d,data=DD MTree GB PreComp (last week) #- check_emc_vnx.pl vnxsumio,data=VNX total IO/s vnxreadio,data=VNX read IO/s vnxwriteio,data=VNX write IO/s vnxspload,data=VNX SP Load (%) ===== rrdopts.conf ===== Für die richtige Darstellung der Zahlenwerte bei Speichergrößen und Transferraten (MB, GB, TB, MBit, GBit usw) muss dem rrdtool mitgeteilt werden, dass es sich um Zahlen mit einer 1024er Basis handelt. Genauso kann in der 'rrdopts.conf'' konfiguriert werden, dass bestimmte werde nicht mit der 1000er Umrechnung (Mega, Giga...) angezeigt werden, sondern der absolute Wert gezeigt wird. # vi /usr/local/nagiosgraph/etc/rrdopts.conf # ... # - check_disk.pl Diskspace C:=-l 0 -b 1024 Diskspace D:=-l 0 -b 1024 Diskspace E:=-l 0 -b 1024 Diskspace /=-l 0 -b 1024 Diskspace /opt=-l 0 -b 1024 Diskspace /var=-l 0 -b 1024 # - check_emc_vnx.pl IO per sec=-X 0 # - check_emc_dd.pl DD Ops CIFS=-X 0 DD Ops NFS=-X 0 DD Disk Usage=-l 0 -b 1024 DD Filesystem Available=-l 0 -b 1024 DD MTree: backup=-l 0 -b 1024 Über weitere Optionen können auch die Farben oder der Titel angepasst werden. # ... # vi /usr/local/nagiosgraph/etc/rrdopts.conf MySQL=--border 1 --color BACK#cccccc Syslog=--color BACK#ffffff --color CANVAS#eeeeee --color FONT#000000 -t LOGHOST #... Eine Übersicht möglicher Optionen findet sich unter: https://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html