MRTG configuration documentation

xiaoxiao2021-03-06  22

Prerequisite software: NET-SNMP and MRTG related file settings You first install MRTG and Net-SNMP (this is not to say), as for why I don't say I have to go to Google, more than I said To detail; the specific setup content is as follows: apache2 / htdocs / mrtg-cfg / mrtg.conf Configuration Workdir: / usr / local / apache2 / htdocs / mrtg / system / testloadMibs: / usr / share / snmp / mibs / ucd-snmp Mib.txt, / usr / share / snmp / mibs / host-resources-mib.txt, / usr / share / snmp / mibs / tcp-mib.txt loadingmibs: / usr / local / share / snmp / mibs / UCD- SNMP-MIB.TXT TITLE [^]: System Statistics PageTop [^]:

Test pagetop [$]: options [^]: growright xsize [_]: 600 ysize [_]: 200 Target [ Memory]: .1.3.6.1.4.1.2021.4.5.0 & .1.3.6.1.4.1.2021.4.5.0: Public@ Test - .1.3.6.1.4.1.21.4.6.0 & .1.3.6.1.4.1.2021.4.6.0 : public @ test - .1.3.6.1.4.1.2021.4.14.0 & PseudoZero: public @ test - .1.3.6.1.4.1.2021.4.15.0 & PseudoZero: public @ test MaxBytes [memory]: 4091552 YLegend [memory]: Bytes ShortLegend [ Memory]: KMG [Memory]: K, M, G, T, P, Legendi [MEMORY]: Used - Buffers Legendo [Memory]: Used PageTop [Memory: Free Memory Options [Memory]: gauge, Nolegend, NOPERCENT TARGET [SWAP]: .1.3.6.1.4.1.2021.4.3.0 & .1.3.6.1.4.1.2 021.4.3.0: Pseudozero &. , T, P, Legendi [SWAP AVAILALAPE [SWAP]: SWAP USED PageToP [SWAP]: Options [SWAP]: Gauge, NoleGend, NOPERCENT TARGET [LOAD]: SSCPURAWUSER.0 & SSCPURAWSYSTEM.0: PUBLIC @test RouterUptime [load]: public @ test MaxBytes [load]: 100 Unscaled [load]: ymwd ShortLegend [load]:% YLegend [load]: CPU Usage legendI [load]: Userspace LegendO [load]: Kernel Options [load ]: Nolegend, NOPERCENT #TARGET [Disk] ;. 1.3.6.1.3.6.1.4.1.2021.9: public @ Test Test Target [Disk]: .1.3.6.1.4.1.2021.9.1.6.1 &

. [disk]: gauge, nolegend, nopercent legendI [disk]: Total LegendO [disk]: Used Target [tcpopen]: tcpCurrEstab.0 & tcpCurrEstab.0: public @ test Options [tcpopen]: gauge, nopercent, growright MaxBytes [tcpopen]: 1000 YLegend [tcpopen]: Tcp Connections ShortLegend [tcpopen]: entries Legend1 [tcpopen]: tcpopen (entries) Legend2 [tcpopen]: legendI [tcpopen]: tcpopen: LegendO [tcpopen]: Title [tcpopen]: TCP [tcpopen] PageTop [TCPOpen]:

TCP Connections [TCP] target [network-internal]: .1.3.6.1.2.1.2.1.2.1.2.1.1.16.2: public @ Test Maxbytes [Network-Internal]: 12500000 Shortlegend [Network-INTERNAL]: B / smrtg.sh placed under the root directory, configured content:

#! / Bin / sh / usr / local / mrtg / bin / mrtg /usr/local/apache2/htdocs/mrtg-cfg/mrtg.conf

Add the following in the snmpd.conf file to be able to display data normally: view systemview include .1.3.6.1.2.1.1 View systemview include .1.3.6.1.2.1.25.1.1 View SystemView Included .1.3.6.1.4.1. 2021.11 view systemview included .1.3.6.1.2.1.25.2.3.1.6 view systemview included .1.3.6.1.4.1.2021.9.1.8 view systemview included .1.3.6.1.2.1.25.1.6 view systemview included .1.3.6.1. 2.1.6.9 view systemview included .1.3.6.1.4.1.2021.4.5.0 view systemview included .1.3.6.1.4.1.2021.4.6.0 view systemview included .1.3.6.1.4.1.2021.9.1.6.1 view systemview included .1.3. 6.1.4.1.2021.9.1.8.1 view systemview included .1.3.6.1.4.1.2021.4.3.0 view systemview included .1.3.6.1.4.1.2021.4.4.0 view systemview included .1.3.6.1.2.1.2.2.1.10.2 view systemview included .1.3.6.1.4.1.2021.9.1.8.1 view systemview included .1.3.6.1.4.1.2021.9 view systemview included .1.3.6.1.4.1.2021.2 view systemview included .1.3.6.1.2.1.2.2.1.16 These are the code to view the code to view the device. If you don't understand, let's see if you have instructions. If your hard drive is inappropriate, you will take the #disk / 100000 annotations in snmpd.conf. The size or higher can be! ! ! !

The following: Disk / 1200000000 Disk / usr / local 2500000

Remember to modify SNMPD.conf to restart SNMP service! ! ! !

Finally, I define it in / etc / crontab: * / 5 * * * * /mrtg.sh executes my shell script every five points

After configuring the replication, you can use the corresponding file.

转载请注明原文地址:https://www.9cbs.com/read-57399.html

New Post(0)