Thursday, May 08, 2008

Another shot at MRTG

And yet, another post dealing with an MRTG configuration file... Being working a lot finessing the setup on many servers that don't have a running Zabbix server around to monitor & trend them.


HtmlDir: /var/www_ssl/default-website/mrtg/
ImageDir: /var/www_ssl/default-website/mrtg/images
LogDir: /var/www_ssl/default-website/mrtg/logs
ThreshDir: /var/lib/mrtg

Refresh: 600
XSize[_]: 250
Ysize[_]: 67
Colours[_]: --#7aafff,--#1000ff,--#006600,--#ff00ff
MaxBytes[_]: 125000000

## -----------------------------------------------

###############################
## Number of procs
###############################
Target[local_procs]: `/usr/local/etc/scripts/dataGathering/stat.pl procs`
Options[local_procs]: nopercent,gauge,noinfo,nobanner,noi
Title[local_procs]: Number of processes
MaxBytes[local_procs]: 1000000
YLegend[local_procs]: Processes
ShortLegend[local_procs]:
LegendO[local_procs]:
LegendI[local_procs]:
Legend1[local_procs]:
Legend2[local_procs]:
PageTop[local_procs]: Number of processes
WithPeak[local_procs]: wmy
Legend4[local_procs]:

## -----------------------------------------------

###############################
## Number of TCP connections
###############################
Target[local_tcpopen]: `/usr/local/etc/scripts/dataGathering/stat.pl tcpopen`
Options[local_tcpopen]: nopercent,gauge,noinfo,nobanner,noi
Title[local_tcpopen]: Open TCP connections
MaxBytes[local_tcpopen]: 1000000
YLegend[local_tcpopen]: Connections
ShortLegend[local_tcpopen]:  
LegendO[local_tcpopen]: Open TCP connections: 
Legend2[local_tcpopen]: Connections
PageTop[local_tcpopen]: Open TCP connections
WithPeak[local_tcpopen]: wmy
Legend4[local_tcpopen]: Max number of open TCP connections

## -----------------------------------------------

###############################
## Uptime
###############################
Target[local_uptime]: `/usr/local/etc/scripts/dataGathering/stat.pl uptime`
Options[local_uptime]: nopercent,gauge,noinfo,nobanner,noi
Title[local_uptime]: Uptime
MaxBytes[local_uptime]: 1000000
YLegend[local_uptime]: Days
ShortLegend[local_uptime]: days
LegendO[local_uptime]: Uptime: 
LegendI[local_uptime]:  
Legend1[local_uptime]:  
Legend2[local_uptime]: Server uptime (in days)
PageTop[local_uptime]: Uptime
WithPeak[local_uptime]: wmy
Legend4[local_uptime]: Server uptime (in days)

## -----------------------------------------------

###############################
## Load
###############################
Target[local_load]: `/usr/local/etc/scripts/dataGathering/stat.pl load`
Options[local_load]: nopercent,gauge,noinfo,nobanner,noi
Title[local_load]: Load
MaxBytes[local_load]: 100
YLegend[local_load]: Load
ShortLegend[local_load]: Load
LegendO[local_load]: Load: 
Legend2[local_load]: load
PageTop[local_load]: Load
WithPeak[local_load]: wmy
Legend4[local_load]: Max system load

## -----------------------------------------------

###############################
## Users on the server
###############################
Target[local_users]: `/usr/local/etc/scripts/dataGathering/stat.pl users`
Options[local_users]: nopercent,gauge,noinfo,nobanner,noi
Title[local_users]: Number of users
MaxBytes[local_users]: 1000
YLegend[local_users]: Users
ShortLegend[local_users]:  
LegendO[local_users]:
LegendI[local_users]:
Legend1[local_users]:
Legend2[local_users]:
PageTop[local_users]: Users logged in
WithPeak[local_users]: wmy
Legend4[local_users]: Max number of users logged in

## -----------------------------------------------

################################
## Volume on eth0
################################
Target[local_vol_eth0]: `/usr/local/etc/scripts/dataGathering/netVol.sh eth0`
Options[local_vol_eth0]: nopercent,noinfo,gauge,nobanner
Maxbytes[local_vol_eth0]: 10000000
kMG[local_vol_eth0]: M,G,T,P
Title[local_vol_eth0]: Incoming on eth0
PageTop[local_vol_eth0]: Volume on eth0
YLegend[local_vol_eth0]: Megabytes
ShortLegend[local_vol_eth0]:  
Legend1[local_vol_eth0]: Incoming
Legend2[local_vol_eth0]: Outgoing
LegendI[local_vol_eth0]: Incoming: 
LegendO[local_vol_eth0]: Outgoing: 
WithPeak[local_vol_eth0]: wmy
Legend3[local_vol_eth0]: Max incoming
Legend4[local_vol_eth0]: Max outgoing

## -----------------------------------------------

LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
Target[local_memory]: memAvailReal.0&memTotalReal.0:XXXXXXXXXXXXX@localhost
Title[local_memory]: Free Memory
PageTop[local_memory]: Free memory
MaxBytes[local_memory]: 100000000000
ShortLegend[local_memory]:  
YLegend[local_memory]: Megabytes
LegendI[local_memory]: Free: 
LegendO[local_memory]: Total: 
Legend1[local_memory]: Free memory, not including swap, in bytes
Legend2[local_memory]: Total memory
Options[local_memory]: gauge,nopercent,noinfo
kMG[local_memory]: k,M,G,T,P,X

LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[local_swap]: memAvailSwap.0&memAvailSwap.0:XXXXXXXXXXXXX@localhost
PageTop[local_swap]: Swap memory
Options[local_swap]: nopercent,gauge,noinfo
Title[local_swap]: Free swap memory
MaxBytes[local_swap]: 4192924
kMG[local_swap]: k,M,G,T,P,X
YLegend[local_swap]: Gigabytes
ShortLegend[local_swap]:  
LegendI[local_swap]: Free swap: 
LegendO[local_swap]:
Legend1[local_swap]: Swap memory avail, in bytes

## -----------------------------------------------

###############################
## RAM & Load use
###############################
Target[local_perf]: `/usr/local/etc/scripts/dataGathering/getLoad2.sh`
Title[local_perf]: CPU load & memory use
MaxBytes[local_perf]: 100
PageTop[local_perf]: CPU load & memory use
Options[local_perf]: noinfo,gauge,nopercent,nobanner
YLegend[local_perf]: Percentage
ShortLegend[local_perf]: %
WithPeak[local_perf]: wmy
Legend1[local_perf]: CPU
Legend2[local_perf]: Memory usage
LegendI[local_perf]: Load: 
LegendO[local_perf]: Mem: 

## -----------------------------------------------

################################
## eth0 traffic
################################
Target[local_traffic]: `/usr/local/etc/scripts/dataGathering/mrtgstat-net.sh eth0`
Title[local_traffic]: Traffic analysis eth0
MaxBytes[local_traffic]: 1400000
PageTop[local_traffic]: Traffic analysis on network interface eth0
Options[local_traffic]: bits,noinfo,nopercent,nobanner
YLegend[local_traffic]: eth0 use
WithPeak[local_traffic]: wmy
LegendI[local_traffic]: Incoming: 
LegendO[local_traffic]: Outgoing: 
Legend1[local_traffic]: Incoming
Legend2[local_traffic]: Outgoing

## -----------------------------------------------

################################
## HDD space
################################
Target[df-root]: `/usr/local/etc/scripts/dataGathering/mrtg-df.sh /`
Options[df-root]: nopercent,nobanner,nolegend,noinfo,integer,gauge
MaxBytes[df-root]: 18577596
kmg[df-root]: KB,MB,GB
Title[df-root]: Disk usage for /
PageTop[df-root]: Disk usage /
YLegend[df-root]: Gigabytes
ShortLegend[df-root]:  
LegendI[df-root]: avail 
LegendO[df-root]: used 

Target[df-boot]: `/usr/local/etc/scripts/dataGathering/mrtg-df.sh /boot`
Options[df-boot]: nopercent,nobanner,nolegend,noinfo,integer,gauge
MaxBytes[df-boot]: 194442
kmg[df-boot]: KB,MB,GB
Title[df-boot]: Disk usage for /boot
PageTop[df-boot]: Disk usage /boot
YLegend[df-boot]: Megabytes
ShortLegend[df-boot]:  
LegendI[df-boot]: avail 
LegendO[df-boot]: used 

Target[df-usr]: `/usr/local/etc/scripts/dataGathering/mrtg-df.sh /usr`
Options[df-usr]: nopercent,nobanner,nolegend,noinfo,integer,gauge
MaxBytes[df-usr]: 30961696
kmg[df-usr]: KB,MB,GB
MaxBytes[df-usr]: 30961696
kmg[df-usr]: KB,MB,GB
Title[df-usr]: Disk usage for /usr
PageTop[df-usr]: Disk usage /usr
YLegend[df-usr]: Gigabytes
ShortLegend[df-usr]:  
LegendI[df-usr]: avail 
LegendO[df-usr]: used 

Target[df-usr-ora]: `/usr/local/etc/scripts/dataGathering/mrtg-df.sh /usr/local/oracle`
Options[df-usr-ora]: nopercent,nobanner,nolegend,noinfo,integer,gauge
MaxBytes[df-usr-ora]: 30961696
kmg[df-usr-ora]: KB,MB,GB
Title[df-usr-ora]: Disk usage for /usr/local/oracle
PageTop[df-usr-ora]: Disk usage /usr/local/oracle
YLegend[df-usr-ora]: Gigabytes
ShortLegend[df-usr-ora]:  
LegendI[df-usr-ora]: avail 
LegendO[df-usr-ora]: used 

Target[df-home]: `/usr/local/etc/scripts/dataGathering/mrtg-df.sh /home`
Options[df-home]: nopercent,nobanner,nolegend,noinfo,integer,gauge
MaxBytes[df-home]: 41990128
kmg[df-home]: KB,MB,GB
Title[df-home]: Disk usage for /home
PageTop[df-home]: Disk usage /home
YLegend[df-home]: Gigabytes
ShortLegend[df-home]:  
LegendI[df-home]: avail 
LegendO[df-home]: used 

Target[df-tmp]: `/usr/local/etc/scripts/dataGathering/mrtg-df.sh /tmp`
Options[df-tmp]: nopercent,nobanner,nolegend,noinfo,integer,gauge
MaxBytes[df-tmp]: 1035660
kmg[df-tmp]: KB,MB,GB
Title[df-tmp]: Disk usage for /tmp
PageTop[df-tmp]: Disk usage /tmp
YLegend[df-tmp]: Megabytes
ShortLegend[df-tmp]:  
LegendI[df-tmp]: avail 
LegendO[df-tmp]: used 

Target[df-var]: `/usr/local/etc/scripts/dataGathering/mrtg-df.sh /var`
Options[df-var]: nopercent,nobanner,nolegend,noinfo,integer,gauge
MaxBytes[df-var]: 25806268
kmg[df-var]: KB,MB,GB
Title[df-var]: Disk usage for /var
PageTop[df-var]: Disk usage /var
YLegend[df-var]: Gigabytes
ShortLegend[df-var]:  
LegendI[df-var]: avail 
LegendO[df-var]: used 

## -----------------------------------------------

# EoF #

Labels: , ,

0 Comments:

Post a Comment

<< Home