ICINGA2 monitoring Windows Server with check_wmi_plus.pl

Source: Internet
Author: User
Tags vars disk usage


ICINGA2 monitoring Windows Server with check_wmi_plus.pl



Windows side:


1. Ensure that the Windows Management Instrumentation service in Services is start (typically start)

2. Add account to local distributed COM users, perfromance Log users, performance Monitor Users Group



ICINGA2 Server side:


check_wmi_plus.pl Download URL:


Http://www.edcint.co.nz/checkwmiplus/?q=downloads


Will download down the check_wmi_plus.v1.60.tar.gz decompression, will be inside the check_wmi_plus.pl copy to/usr/lib64/nagios/plugins/under, etc directory of Check_wmi_ Plus Copy the/etc/to the server.


# cp/etc/check_wmi_plus/check_wmi_plus.conf.sample/etc/check_wmi_plus/check_wmi_plus.conf

# vi/etc/check_wmi_plus/check_wmi_plus.conf


$base _dir= '/etc/check_wmi_plus ';


$ignore _my_outdated_perl_module_versions=1;


: Wq





Installing the Perl module supports:


# CPAN Number::format

# CPAN Config::inifiles

# CPAN YAML

# CPAN DateTime



WMIC download URL (need to invoke WMIC command):


Http://rpm.pbone.net/index.php3/stat/4/idpl/21769667/dir/opensuse/com/wmic-1.3.13-8.1.x86_64.rpm.html


# rpm-i wmic-1.3.13-8.1.x86_64.rpm




Directly with the user name, password method:


#/usr/lib64/nagios/plugins/check_wmi_plus.pl-h 10.0.0.3-u [email protected]-P xxxxx-m checkcpu-w 80-c 90




Write the account number and password method in the file:


# Vi/etc/check_wmi_plus/wmi.auth


Username=zhi.yang

Password=xxxx

Domain=ming.com

: Wq


#/usr/lib64/nagios/plugins/check_wmi_plus.pl-h 10.0.0.3-a/etc/check_wmi_plus/wmi.auth-m checkcpu-w 80-c 90






To crawl the Windows CPU:

#/usr/lib64/nagios/plugins/check_wmi_plus.pl-h 10.0.0.3-a/etc/check_wmi_plus/wmi.auth-m checkcpu-w 80-c 90


Crawl Windows Diskio:

#/usr/lib64/nagios/plugins/check_wmi_plus.pl-h 10.0.0.3-a/etc/check_wmi_plus/wmi.auth-m checkio-s logical-a D:



To crawl Windows D disk usage:

#/usr/lib64/nagios/plugins/check_wmi_plus.pl-h 10.0.0.3-a/etc/check_wmi_plus/wmi.auth-m checkdrivesize-w 80-c 90-a D:



Crawl Windows Memory Usage:

#/usr/lib64/nagios/plugins/check_wmi_plus.pl-h 10.0.0.3-a/etc/check_wmi_plus/wmi.auth-m checkmem-w 80-c 90



Crawl Windows network conditions (send and receive, local Area Connection refers to 1):

#/usr/lib64/nagios/plugins/check_wmi_plus.pl-h 10.0.0.3-a/etc/check_wmi_plus/wmi.auth-m checknetwork-a ' Local area Connection '


Number of crawl Windows user connections:

#/usr/lib64/nagios/plugins/check_wmi_plus.pl-h 10.0.0.3-a/etc/check_wmi_plus/wmi.auth-m checkts-s Sessions




Integration into ICINGA2:



# vi/etc/icinga2/conf.d/templates.conf


Object Checkcommand "Win-users" {

Import "Plugin-check-command"

Command = [Plugindir + "/check_wmi_plus.pl"]

Arguments = {

"-H" = "$address $"

"-A" = "$wmiauthdir $"

"-M" = "$mode $"

"-S" = "$sessions $"

}

}

: Wq


# vi/etc/icinga2/conf.d/services.conf


Apply Service "Win_users" {

Import "Generic-service"

Check_command = "Win-users"

Vars.wmiauthdir= "/etc/check_wmi_plus/wmi.auth"

Vars.mode= "Checkts"

Vars.sessions= "Sessions"

Vars.perf = True

assign where Host.vars.os = = "RDBJ"

: Wq


# Service ICINGA2 Restart



Integrate to Grafana (generate graph)




This article is from the "Linux" blog, so be sure to keep this source http://yangzhiming.blog.51cto.com/4849999/1915428

ICINGA2 monitoring Windows Server with check_wmi_plus.pl

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.