VMWare Hosts Monitoring

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.
Locked
michaelpn
Posts: 54
Joined: Fri Jul 14, 2017 12:12 am

VMWare Hosts Monitoring

Post by michaelpn »

Hi,

my Nagios Core Version 4.3.2 is running without no issues. I have added 40 Servers without no problems. But I have still my VMWare hosts. 4 hosts I would like to add/Monitor. By the Servers I normally install the NSClient but how can I add my VMWare hosts in to Nagios ? I mean it is really critical if one of my VMWare hosts is crashing their by all my servers are installed - collected. Is their a way to add the hosts to Nagios so I also can monitor my VMWare?

Michael Pierre Nielsen
Forenede Gruppliv
Krumtappen 4
Copenhagen
Denmark
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: VMWare Hosts Monitoring

Post by eloyd »

With Core, you have to treat your VMware hosts as if they were generic Linux machines. You have two options:

1) Use some sort of agent to allow you to check things on the VMware host
2) Use SNMP to gather what you can via SNMP

The easiest (in my opinion) way to do this is option 1, by enabling the SSH server on your VMware host, restricting it via the firewall to your Nagios server, and then copying the Nagios plugins to a new directory (maybe, /usr/local/nagios/libexec) on the VMware host. Now you can use the check_by_ssh wrapper from Nagios Core to check things on the VMware host, but only if the plugin is a shell script (as opposed to an executable image). It's not ideal, but it's easy and works great with no added firewall or security issues (beyond those inherent to running SSH).

Using SNMP based checks are also possible if you enable the SNMP server on the VMware host, figure out the MIBs you're interested in, and monitor those via the check_snmp plugin.


FYI, some shell script based plugins include (some of these may not be in your collection of plugins):

Code: Select all

check_bl:                     a /usr/bin/perl -w script text executable
check_bpi.php:                a /usr/bin/php script text executable
check_cpu_stats.sh:           POSIX shell script text executable
check_dir:                    POSIX shell script text executable
check_disk_smb:               a /usr/bin/perl -w script text executable
check_domain.php:             a /usr/bin/php script text executable
check_email_delivery:         a /usr/bin/perl script text executable
check_email_loop.pl:          a /usr/bin/perl script text executable
check_esx3.pl:                a /usr/bin/perl -w script text executable
check_file_age:               a /usr/bin/perl -w script text executable
check_flexlm:                 a /usr/bin/perl -w script text executable
check_ftp_fully:              Bourne-Again shell script text executable
check_ifoperstatnag:          POSIX shell script text executable
check_ifoperstatus:           a /usr/bin/perl -w script text executable
check_ifstatus:               a /usr/bin/perl -w script text executable
check_imap_receive:           a /usr/bin/perl script text executable
check_init_service:           POSIX shell script text executable
check_ircd:                   a /usr/bin/perl -wT script text executable
check_log:                    POSIX shell script text executable
check_mailq:                  a /usr/bin/perl -w script text executable
check_mongodb.py:             a /usr/bin/env python script text executable
check_mountpoints.sh:         Bourne-Again shell script text executable
check_mssql:                  a /usr/bin/php script text executable
check_mssql_database.py:      a /usr/bin/env python script text executable
check_mssql_server.py:        a /usr/bin/env python script text executable
check_mysql_health:           a /usr/bin/perl -w script text executable
check_nagioslogserver.php:    a /usr/bin/php script text executable
check_nagios_performance.php: a /usr/bin/php script text executable
check_nagiosxiserver.php:     PHP script text
check_ncpa.py:                a /usr/bin/env python script text executable
check_netstat.pl:             a /usr/bin/perl script text executable
check_nna.py:                 a /usr/bin/env python script text executable
check_open_files.pl:          a /usr/bin/perl script text executable
check_oracle:                 POSIX shell script text executable
check_pnp_rrds.pl:            a /usr/bin/perl script text executable
check_postgres.pl:            a /usr/bin/perl -- -*-cperl-*- script text executable
check_rpc:                    a /usr/bin/perl -w script text executable
check_rrdtraf:                POSIX shell script text executable
check_rrdtraf.php:            a /usr/bin/php script text executable
check_sensors:                POSIX shell script text executable
check_services:               Bourne-Again shell script text executable
check_sip:                    a /usr/bin/perl -w script text executable
check_ssh_expect.pl:          a /usr/bin/env perl script text executable
check_tftp.sh:                Bourne-Again shell script text executable
check_win_snmp_disk.pl:       a /usr/bin/perl script text executable
check_wmi_plus.pl:            a /usr/bin/perl -w script text executable
check_xisla.php:              a /usr/bin/php script text executable
check_yum:                    a /usr/bin/perl script text executable
Last edited by eloyd on Mon Sep 18, 2017 4:08 pm, edited 1 time in total.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: VMWare Hosts Monitoring

Post by dwhitfield »

Thanks for the assist @eloyd!
michaelpn
Posts: 54
Joined: Fri Jul 14, 2017 12:12 am

Re: VMWare Hosts Monitoring

Post by michaelpn »

Hi Eloyd,

many thanks for your answer. But what are you meaning by writing "copying the Nagios plugins to a new directory (maybe, /usr/local/nagios/libexec) on the VMware host." I don’t understand ? Why WMWare host you can’t copy them to the VMWare host!!.

What I have understand so fare:

1. enable ssh on my vmware host - you mean open the secure shell

2. restricting it via the firewall to your Nagios server - but how should I do that - please explain or show me :)

What I don't understand or have no experience:

1. Now you can use the check_by_ssh wrapper from Nagios Core to check things on the VMware host - please explain :)

2. but only if the plugin is a shell script (as opposed to an executable image) - please explain :)
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: VMWare Hosts Monitoring

Post by dwhitfield »

michaelpn wrote:
1. enable ssh on my vmware host - you mean open the secure shell

2. restricting it via the firewall to your Nagios server - but how should I do that - please explain or show me :)
I suspect you'll get quicker answers for the above type of questions from the VMWare forums.

As for monitoring VMWare, why not take a look at some of the VMWare plugins? https://exchange.nagios.org/directory/P ... nts/VMWare
michaelpn
Posts: 54
Joined: Fri Jul 14, 2017 12:12 am

Re: VMWare Hosts Monitoring

Post by michaelpn »

Hi dwhitfield,
I myself have solved the problem. Thanks:)
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
kyang

Re: VMWare Hosts Monitoring

Post by kyang »

Glad to hear you were able to resolve your own question!

I'll be closing this topic as resolved! Feel free to post another thread if you have more questions!
Locked