Nagios monitors Windows network card traffic

Source: Internet
Author: User
Tags snmp

Nagios Server: 192.168.5.203

Windows is monitored end 192.168.5.208

    1. Install the SNMP service under Windows Server2003 for example

      Control Panel---Add Remove Programs---Add remove Windows Components---tick management and monitoring tools---next---complete

      650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/C9/wKioL1QadmmgMMXxAADwo_FxpKs777.jpg "title=" W01.png "alt=" Wkiol1qadmmgmmxxaadwo_fxpks777.jpg "/>

2. Open the service and locate the SNMP service

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/49/C7/wKiom1QadruB8IrJAAAlhvRZ8K0996.jpg "title=" W02.png "alt=" Wkiom1qadrub8irjaaalhvrz8k0996.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/C9/wKioL1Qadx3QT8LXAAIeSCZbseQ473.jpg "title=" W03.png "alt=" Wkiol1qadx3qt8lxaaiesczbseq473.jpg "/>

Right-click SNMP Service---Properties---security---tick send authentication traps, add community public, read and write permissions, accept SNMP packets from any host---determine

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/49/C9/wKioL1Qad4HBS9xxAAFUVJiFCsE635.jpg "title=" W04.png "alt=" Wkiol1qad4hbs9xxaafuvjifcse635.jpg "/>

Restart the SNMP Server

To see if the UDP161 port exists

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/49/C9/wKioL1QaeEjg6yGzAAApzBV0_EM922.jpg "title=" W05.png "alt=" Wkiol1qaeejg6ygzaaapzbv0_em922.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/C9/wKioL1QaeFfiLjvdAABAJ_OXbpE016.jpg "title=" W06.png "alt=" Wkiol1qaeffiljvdaabaj_oxbpe016.jpg "/>

3.nagios Server Configuration

To see if an SNMP package is installed

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/49/C9/wKioL1Qaf1iAktlsAACSBu_xQiY869.jpg "title=" W001.png "alt=" Wkiol1qaf1iaktlsaacsbu_xqiy869.jpg "/>

Modify snmpd.conf, such as

[Email protected] ~]# vim/etc/snmp/snmpd.conf

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/C9/wKioL1Qaf-7TblEeAAK0L21EOZA676.jpg "title=" W002.png "alt=" Wkiol1qaf-7tbleeaak0l21eoza676.jpg "/>

Restart SNMPD

[Email protected] ~]# service snmpd restart

Download the check_traffic.sh and upload to the Nagios server

1) http://pan.baidu.com/s/1jGmR1S6 put to/usr/local/nagios/libexec/, and give execute permission

[Email protected] ~]# ll/usr/local/nagios/libexec/check_traffic.sh

-rwxr-xr-x. 1 root root 26150 Mar 2012/usr/local/nagios/libexec/check_traffic.sh

2) Add a command to detect traffic on the Nagios server

[Email protected] ~]# vim/usr/local/nagios/etc/objects/commands.cfg

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/C7/wKiom1QaetHjTKMnAACqnhG86M4347.jpg "title=" W07.png "alt=" Wkiom1qaethjtkmnaacqnhg86m4347.jpg "/>

-C after parameter is set community value in snmpd.conf

-I Capital I, followed by the index value of the NIC pretext

-W followed by Nic In,out traffic exceeds this value warning

-C heel NIC In,out traffic exceeds this value alarm

-k-b Unit is KB

3) Add check_traffic Service

View the network card information of the monitored side windows, you can see only one network card, the network card index value is 65539

#/usr/local/nagios/libexec/check_traffic.sh-v 2c-c public-h 192.168.5.208-l

List Interface for host 192.168.5.208.

Interface Index 1 orresponding to MS TCP Loopback Interface

Interface index 65539 orresponding to Realtek RTL8139 Family PCI Fast Ethernet NIC

[Email protected] ~]# vim/usr/local/nagios/etc/objects/windows.cfg

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/C9/wKioL1QaftaAPvkRAABX079hLAc645.jpg "title=" W09.png "alt=" Wkiol1qaftaapvkraabx079hlac645.jpg "/>


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/49/C9/wKioL1QafuHj7VvKAACD5UsMSyE443.jpg "title=" W08.png "alt=" Wkiol1qafuhj7vvkaacd5usmsye443.jpg "/>

Note: SERVICES-PNP is only valid if PNP is installed

Restart Nagios Service: Displays the Nagios process, kills the process, and then starts the process (it is recommended to start or stop in this way)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/CA/wKioL1QagI3DjnUBAAF8O2gG0Cc962.jpg "title=" W10.png "alt=" wkiol1qagi3djnubaaf8o2gg0cc962.jpg "/>[[email protected] ~]# kill 16464

[Email protected] ~]#/usr/local/nagios/bin/nagios-d/usr/local/nagios/etc/nagios.cfg

Access Monitoring Page Http://192.168.5.203/nagios view

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/CA/wKioL1Qagkyynd8TAACIAvTfRRA704.jpg "title=" W11.png "alt=" Wkiol1qagkyynd8taaciavtfrra704.jpg "/> Summary:

1. If the monitoring page is incorrectly displayed Return code of 127 is out of bounds-plugin could be missing

Possible cause is error in the command to add detection traffic, carefully check the keyword path format is correct

2. If the Monitoring page error displays 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/49/CA/wKioL1QagxXghSCVAADINWoui4c342.jpg " Title= "W1.png" alt= "wkiol1qagxxghscvaadinwoui4c342.jpg"/> Workaround: Empty/var/tmp/temporary files in the Nagios server or add 777 permissions to/uar/tmp/

3. Test if you can get the traffic data of the monitored machine card

[Email protected] local]#/usr/local/nagios/libexec/check_traffic.sh-v 2c-c public-h 192.168.5.208-i 65539-w 200,300 -C 400,500-k-B

If normal, the first test shows

Ok-it ' s The first time for this plugins run. We ll get the data from the next time.

The second time the collected data is displayed, for example

Ok-the traffic in are 0.50KB, out are 0.0KB, Total is 0.50KB. The Check Interval is 625s | In=0.50kb;200;400;0;0 Out=0.0kb;300;500;0;0 Total=0.50kb;500;900;0;0 Interval=625s;1200;1800;0;0



This article from "Dream Three" blog, declined reprint!

Nagios monitors Windows network card traffic

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.