Page 2 of 6
Re: Configuring Nagios Cross Platform Agent (NCPA)
Posted: Thu Jan 15, 2015 2:37 pm
by clombardo
Thank you very much for all your responses.
After a meeting with my boss he wants to do agentless monitoring so I am reading the documents to learn how. Hopefully we can do all this via open source to monitor all window machines (users) getting detailed information for each machine we have here.
Re: Configuring Nagios Cross Platform Agent (NCPA)
Posted: Fri Jan 16, 2015 10:34 am
by tmcdonald
"Agentless" is somewhat of a misnomer, since even SNMP or WMI are technically a sort of agent, but I understand what you mean. Those two methods are probably what you will want to look at, since they are both available on modern Windows boxes.
Re: Configuring Nagios Cross Platform Agent (NCPA)
Posted: Fri Jan 16, 2015 11:45 am
by clombardo
Yes that is what I have been reading about in the documentation. Now I have a question in regards to WMI ... Can WMI be installed on Nagios Core or do we need Nagios XI? Cause right now we only have Nagios Core installed on our server, NOT Nagios XI. I cannot find any documentation describing/discussing installation of WMI on Nagios Core.
Re: Configuring Nagios Cross Platform Agent (NCPA)
Posted: Fri Jan 16, 2015 11:59 am
by tmcdonald
WMI is not something you install on your Nagios server, it is part of the Windows environment (Windows Management Instrumentation). You use Nagios plugins to query WMI:
http://exchange.nagios.org/directory/Pl ... us/details
Re: Configuring Nagios Cross Platform Agent (NCPA)
Posted: Tue Jan 20, 2015 3:06 pm
by clombardo
Thank you very much for all this great information
So now I am in the process of installing Check WMI Plus, I'm in the process of reading their documentation in helping me guide with this installation at
http://www.edcint.co.nz/checkwmiplus/ If any problem arise I'll post my question.
Re: Configuring Nagios Cross Platform Agent (NCPA)
Posted: Tue Jan 20, 2015 3:30 pm
by tmcdonald
We'll keep this open for any (related) issues.
Re: Configuring Nagios Cross Platform Agent (NCPA)
Posted: Wed Jan 21, 2015 11:54 am
by clombardo
I am trying to configuring WMI by customizng the check_wmi_plus.conf file, there is a field as shown below:
Code: Select all
# This is the full path location of the wmic command
# - standard value "$base_dir/wmic"
$wmic_command="/bin/wmic"; # CHANGE THIS IF NEEDED
I am not sure what this is as I am setting this up on a Linux server to monitor windows machines. Any ideas?
Re: Configuring Nagios Cross Platform Agent (NCPA)
Posted: Wed Jan 21, 2015 5:30 pm
by slansing
On a default XI installation this would be in:
Or:
Not sure where it is on your system, you could run a find, grep, or locate on the system to find it's local path. For a default XI installation on centos/rhel the below is the check_wmi_plus.conf:
Code: Select all
# Check WMI Plus Config file
# This is read in-line into the perl program, so the syntax has to be just right.
# The settings in here override the default settings in the plugin code
# This file is only required if you want to change the default settings in the plugin
# It is provided in the release package as check_wmi_plus.conf.sample
# Rename it to check_wmi_plus.conf and/or set its location right at the top of the check_wmi_plus.pl script
# this file makes it easier to upgrade the plugin since you can keep your old settings in your own copy of this file
# ---------------------- FILE LOCATIONS -------------------------
# we are looking for the dir where utils.pm is located. This is normally installed as part of Nagios
use lib "/usr/lib/nagios/plugins"; # CHANGE THIS IF NEEDED
# Set the full path where the plugin is installed
# You might not even use this variable if you have different locations for everything
# as a first guess, grab the directory that this conf file lives in
$base_dir="$conf_file_dir"; # CHANGE THIS IF NEEDED
# This is the full path location of the wmic command
# - standard value "$base_dir/wmic"
$wmic_command="/usr/bin/wmic"; # CHANGE THIS IF NEEDED
# you do not need to use this if you are using $wmi_ini_dir
# normally you would only use this if you had a single specific ini file you wanted to use
# set the location of the ini file. Set to '' if not using it or specify using the --inifile parameter
# set this to something else if you want
# - standard value "$base_dir/check_wmi_plus.ini"
$wmi_ini_file='/usr/local/nagios/libexec/check_wmi_plus.ini'; # CHANGE THIS IF NEEDED
# set the location of the ini dir. Set to '' if not using it or specify using the --inidir parameter
# set this to something else if you want
# you might like to use "$base_dir/wmic"
# - standard value "$base_dir/check_wmi_plus.d"
$wmi_ini_dir="/usr/local/nagios/libexec"; # CHANGE THIS IF NEEDED,
# set the location of temporary directory - used for keep state option
$tmp_dir='/tmp'; # CHANGE THIS IF NEEDED
# this script helps with making the manpage help. By default it is in the same directory as the plugin itself
$make_manpage_script="$base_dir/check_wmi_plus.makeman.sh"; # CHANGE THIS IF NEEDED
# this is the directory where the manpage is stored when created, defaults to the same directory as the ini files
$manpage_dir="$wmi_ini_dir"; # CHANGE THIS IF NEEDED
You can change paths, etc, to match your manual installation as you are running Core. Their installation guide also outlines this I believe:
http://www.edcint.co.nz/checkwmiplus/
Re: Configuring Nagios Cross Platform Agent (NCPA)
Posted: Thu Jan 22, 2015 10:07 am
by clombardo
Thank you for this. I looked on our server where our Nagios Core is installed and wmic is actually in the same location as your Nagios XI:
I continue to setup and learn this WMI setup, so I'll update for more questions.
Re: Configuring Nagios Cross Platform Agent (NCPA)
Posted: Thu Jan 22, 2015 11:01 am
by clombardo
Now I am trying to setup this line in the check_wmi_plus.conf file:
Code: Select all
# this is the directory where the manpage is stored when created, defaults to the same directory as the ini files
$manpage_dir="$wmi_ini_dir"; # CHANGE THIS IF NEEDED
When I go on the server to view the manpage for wmic here is what happens:
Code: Select all
[root@develop check_wmi_plus.d]# man wmic
No manual entry for wmic
Is there something I missed when I installed Check WMI Plus? Any ideas?