Configuring Nagios Cross Platform Agent (NCPA)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
clombardo
Posts: 41
Joined: Thu Mar 06, 2014 12:36 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post 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.
Former Nagios employee
clombardo
Posts: 41
Joined: Thu Mar 06, 2014 12:36 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post 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
Former Nagios employee
clombardo
Posts: 41
Joined: Thu Mar 06, 2014 12:36 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by tmcdonald »

We'll keep this open for any (related) issues.
Former Nagios employee
clombardo
Posts: 41
Joined: Thu Mar 06, 2014 12:36 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post by slansing »

On a default XI installation this would be in:

Code: Select all

/usr/bin/wmic
Or:

Code: Select all

/usr/local/bin/wmic
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/
clombardo
Posts: 41
Joined: Thu Mar 06, 2014 12:36 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post 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:

Code: Select all

$wmic_command="/usr/bin/wmic";
I continue to setup and learn this WMI setup, so I'll update for more questions.
clombardo
Posts: 41
Joined: Thu Mar 06, 2014 12:36 pm

Re: Configuring Nagios Cross Platform Agent (NCPA)

Post 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?
Locked