Sunday, April 20, 2008

Back to basics

Smoke or no smoke I had a lot of work last week.
Had to setup MRTG on some servers, and this time decided to implement it using SNMP instead of the regular way I use, executing shell scripts to get the data.


## /etc/mrtg/mrtg.cfg from
## xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Htmldir: /var/www/html/mrtg
Imagedir: /var/www/html/mrtg/images
Logdir: /var/www/html/mrtg/logs

Refresh: 600
XSize[_]: 250
Ysize[_]: 67

Colours[_]: --#7aafff,--#1000ff,--#006600,--#ff00ff

MaxBytes[_]: 125000000

LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt

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

Title[local_mempercent]: Percentage free memory
PageTop[local_mempercent]: Percentage free memory
Target[local_mempercent]: ( memAvailReal.0&memAvailReal.0:RaBinG0sting7320@localhost ) * 100 / ( memTotalReal.0&memTotalReal.0:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost )
options[local_mempercent]: gauge,transparent,nopercent,noinfo
Unscaled[local_mempercent]: ymwd
MaxBytes[local_mempercent]: 100
YLegend[local_mempercent]: Memory %
ShortLegend[local_mempercent]: Percent
LegendI[local_mempercent]: Free
LegendO[local_mempercent]: Free
Legend1[local_mempercent]: Percentage free memory
Legend2[local_mempercent]: Percentage free memory

Target[local_memory]: memAvailReal.0&memTotalReal.0:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost
Title[local_memory]: Free Memory
PageTop[local_memory]: Free memory
MaxBytes[local_memory]: 100000000000
ShortLegend[local_memory]: B
YLegend[local_memory]: Bytes
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

Target[local_load]:ssCpuRawUser.0&ssCpuRawUser.0:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost + ssCpuRawSystem.0&ssCpuRawSystem.0:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost + ssCpuRawNice.0&ssCpuRawNice.0:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost
Title[local_load]: Server CPU load
PageTop[local_load]: CPU load
MaxBytes[local_load]: 100
ShortLegend[local_load]: %
YLegend[local_load]: CPU Utilization
Legend1[local_load]: Current CPU percentage load
LegendI[local_load]: Used
LegendO[local_load]:
Options[local_load]: nopercent,noinfo
Unscaled[local_load]: ymwd

Target[local_eth0]: 2:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost:
Options[local_eth0]: nopercent,noinfo
SetEnv[local_eth0]: MRTG_INT_IP="161.196.132.11" MRTG_INT_DESCR="dc0"
MaxBytes[local_eth0]: 12500000
Title[local_eth0]: Traffic analysis for ethernet card eth0
PageTop[local_eth0]: Ethernet card eth0
WithPeak[local_eth0]:wmy

Target[local_newconns]: tcpPassiveOpens.0&tcpActiveOpens.0:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost
Title[local_newconns]: Newly created TCP connections
PageTop[local_newconns]: New TCP connections
MaxBytes[local_newconns]: 10000000000
ShortLegend[local_newconns]: c/s
YLegend[local_newconns]: Conns / Min
LegendI[local_newconns]: In
LegendO[local_newconns]: Out
Legend1[local_newconns]: New inbound connections
Legend2[local_newconns]: New outbound connections
Options[local_newconns]: nopercent,perminute,noinfo

Target[local_estabcons]: tcpCurrEstab.0&tcpCurrEstab.0:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost
Title[local_estabcons]: Currently established TCP connections
PageTop[local_estabcons]: Established TCP connections
MaxBytes[local_estabcons]: 10000000000
ShortLegend[local_estabcons]:
YLegend[local_estabcons]: Connections
LegendI[local_estabcons]: In
LegendO[local_estabcons]:
Legend1[local_estabcons]: Established connections
Legend2[local_estabcons]:
Options[local_estabcons]: nopercent,gauge,noinfo

Target[local_df_root_boot]: dskPercent.1&dskPercent.2:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost
Title[local_df_root_boot]: Disk partition usage
PageTop[local_df_root_boot]: Disk partition usage / and /boot
MaxBytes[local_df_root_boot]: 100
ShortLegend[local_df_root_boot]: %
YLegend[local_df_root_boot]: Utilization
LegendI[local_df_root_boot]: /
LegendO[local_df_root_boot]: /boot
Options[local_df_root_boot]: gauge,nopercent,noinfo
Unscaled[local_df_root_boot]: ymwd

Target[local_df_data1_home]: dskPercent.3&dskPercent.4:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost
Title[local_df_data1_home]: Disk partition usage
PageTop[local_df_data1_home]: Disk partition usage /data1 and /home
MaxBytes[local_df_data1_home]: 100
ShortLegend[local_df_data1_home]: %
YLegend[local_df_data1_home]: Utilization
LegendI[local_df_data1_home]: /data1
LegendO[local_df_data1_home]: /home
Options[local_df_data1_home]: gauge,nopercent,noinfo
Unscaled[local_df_data1_home]: ymwd

Target[local_df_tmp_usr]: dskPercent.5&dskPercent.6:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost
Title[local_df_tmp_usr]: Disk partition usage
PageTop[local_df_tmp_usr]: Disk partition usage /tmp and /usr
MaxBytes[local_df_tmp_usr]: 100
ShortLegend[local_df_tmp_usr]: %
YLegend[local_df_tmp_usr]: Utilization
LegendI[local_df_tmp_usr]: /tmp
LegendO[local_df_tmp_usr]: /usr
Options[local_df_tmp_usr]: gauge,nopercent,noinfo
Unscaled[local_df_tmp_usr]: ymwd

Target[local_df_usr_oracle_var]: dskPercent.7&dskPercent.8:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost
Title[local_df_usr_oracle_var]: Disk partition usage
PageTop[local_df_usr_oracle_var]: Disk partition usage /usr/local/oracle and /var
MaxBytes[local_df_usr_oracle_var]: 100
ShortLegend[local_df_usr_oracle_var]: %
YLegend[local_df_usr_oracle_var]: Utilization
LegendI[local_df_usr_oracle_var]: /usr/local/oracle
LegendO[local_df_usr_oracle_var]: /var
Options[local_df_usr_oracle_var]: gauge,nopercent,noinfo
Unscaled[local_df_usr_oracle_var]: ymwd

Target[local_process]: .1.3.6.1.2.1.25.1.6.0&.1.3.6.1.2.1.25.1.6.0:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost
Options[local_process]: gauge,nopercent,noinfo
MaxBytes[local_process]: 1000
YLegend[local_process]: Processes
ShortLegend[local_process]:
Legend1[local_process]:
Legend2[local_process]:
LegendI[local_process]:
LegendO[local_process]:
Title[local_process]: Number of processes
PageTop[local_process]: Number of processes

Target[local_user]: hrSystemNumUsers.0&hrSystemNumUsers.0:XXXXXXXXXXXXXXXXXXXXXXXXXx@localhost
Options[local_user]: nopercent,gauge,noinfo
Title[local_user]: Logged users
PageTop[local_user]: Logged users
MaxBytes[local_user]: 100
YLegend[local_user]: # users
ShortLegend[local_user]: users
LegendI[local_user]: Users:
LegendO[local_user]:
Legend1[local_user]: Logged users


# EoF #

Labels: , ,

0 Comments:

Post a Comment

<< Home