GithubHelp home page GithubHelp logo

baldmansmojo / check_vmware_esx Goto Github PK

View Code? Open in Web Editor NEW
124.0 26.0 66.0 1.18 MB

chech_vmware_esx Fork of check_vmware_api.pl

License: GNU General Public License v2.0

Makefile 0.18% Perl 99.68% Raku 0.14%

check_vmware_esx's Introduction

check_vmware_esx for VMware Monitoring

Table of Contents

  1. About
  2. License
  3. Support
  4. Requirements
  5. Installation
  6. Configuration
  7. FAQ
  8. Thanks
  9. Contributing

About

Check VMware ESX is a plugin to monitor VMware ESX and vSphere servers. You can monitor either a single ESX(i)/vSphere server or a VMware VirtualCenter/vCenter Server and individual virtual machines. If you have a VMware cluster you should monitor the data center (VMware VirtualCenter/vCenter Server) and not the individual ESX/vSphere servers.

Supports check status of ESX(i) server, vSphere 5.1 up to vSphere 6.5.

chech_vmware_esx is a fork of check_vmware_api.

License

This plugin is licensed under the terms of the GNU General Public License Version 2, you will find a copy of this license in the LICENSE file included in the source package.

Support

Join the community channels from Icinga, Nagios, Naemon for questions. A common place to kindly ask and discuss can be joined at monitoring-portal.org.

Requirements

VMware Perl SDK

Download the vSphere Perl SDK (requires a free account that you sign up for at the same page).

Do not use SDK 6.0 because it contains some bugs and incompatibilities. Use SDK 5.5 or 6.5. Both work well.

Install the SDK. An installation guide can be found here.

Perl Modules

Please ensure that the following Perl modules are installed on your system:

  • File::Basename
  • HTTP::Date
  • Getopt::Long
  • Time::Duration
  • Time::HiRes
  • VMware::VIRuntime (see above)

Installation

Best practice is to keep your own plugins separated from the official Monitoring Plugins. You can adopt the paths in the following sections to your own needs. For simplicity, the documentation refers to the existing Monitoring Plugins directory where Monitoring Cores would expect them.

Single File Installation

Similar to how check_mysql_health and variants are compiled into a single Perl plugin script, Sven Nierlein contributed a Makefile which generates a single file to install.

Example on Debian/Ubuntu:

make all
cp check_vmware_esx /usr/lib/nagios/plugins/
chmod 755 /usr/lib/nagios/plugins/check_vmware_esx

Note

This is recommended if you are having trouble with missing Perl modules, e.g. help.pm is not found.

Now proceed with the configuration chapter.

Modular Installation

The plugin script requires the modules directory being copied into an upgrade safe location. Best is to put them outside of the system's Perl path. The default settings expects them in the same directory where the plugin is copied to, e.g. /usr/lib/nagios/plugins on Debian/Ubuntu/SUSE or /usr/lib64/nagios/plugins on RHEL/CentOS.

Example on Debian/Ubuntu:

cp -r modules /usr/lib/nagios/plugins/
cp check_vmware_esx.pl /usr/lib/nagios/plugins/check_vmware_esx
chmod 755 /usr/lib/nagios/plugins/check_vmware_esx

In case you want to put modules into a different location, you need to edit the plugin script and add your own modules path, e.g. /usr/lib/nagios/vmware/modules.

vim /usr/lib/nagios/plugins/check_vmware_esx

#use lib "modules";
use lib "/usr/lib/nagios/vmware/modules";

Now proceed with the configuration chapter.

Configuration

Evaluate the required parameters and modules by testing the plugin as nagios/icinga user on the shell. Invoke --help to find out more about possible modes and parameters.

Monitoring Configuration

Icinga 2 provides VMware CheckCommand definitions in its template library already. Icinga 1.x/Nagios require you to create command definitions beforehand.

Example for Icinga 2 and DC volumes:

apply Service "vcenter-volumes" {
  check_command = "vmware-esx-dc-volumes"
  vars.vmware_datacenter = "vcenter.yourdomain.local"
  vars.vmware_username = "[email protected]"
  vars.vmware_password = "password"

  assign where "VMware" in host.groups
}

Authentication

In order to avoid credentials in your service definition, you can also use an authorization file and pass it as argument to the plugin.

mkdir -p /etc/icinga2/authfiles/vcenter-auth
cat >/etc/icinga2/authfiles/vcenter-auth <<EOF
[email protected]
password=mypassword
EOF

Example for Icinga 2 and DC volumes:

apply Service "vcenter-volumes" {
  check_command = "vmware-esx-dc-volumes"
  vars.vmware_datacenter = "vcenter.yourdomain.local"
  vars.vmware_authfile = "/etc/icinga2/authfiles/vcenter-auth"

  assign where "VMware" in host.groups
}

Session File

Adjust the path for $sessionfile_dir_def inside the script if required. This defaults to /tmp.

FAQ

Timeouts

If you are encountering timeouts using the VMware Perl SDK, check this blog entry.

You then need to downgrade the libwww-perl package.

Compatibility with Plugin Developer Guidelines

According to the guidelines every plugin should start it's output with

SERVICE STATUS: First line of output | First part of performance data

The service status part wasn't implemented in output in the past because from a technically view it is not necessary. For notifications this string is available as a macro ($SERVICESTATE$) together with the state ID ($SERVICESTATEID$). If the macro is used for notifications you will have a doubled string (for example CRITICAL CRITICAL). While this is only cosmetics for email and in the webgui (if a check is red you need the extra string CRITICAL only when you are clour-blind) it can have side effects using SMS because the string length in SMS is limited. So you have to filter the message (sed) before you send it.

To fulfill the rules of the Plugin Developer Guidelines an extra option --statelabels=<y/n> was added. The default is set in the plugin in the variable $statelabels_def which is set to "y" by default.

Simon Meggle proposed --nostatelabels (thanks Simon - it was a good idea to add it) but I preferred it the other way round first. Caused by some feedback I decided to offer all options. If you don't like statelabels (like me) just set the variable to "n".

HTML in Output

HTML in output is caused by the option --multiline or in some situtations where you need a multiline output in the service overview window. So here a
tag is used to have a line break. Using --multiline will always cause a
instead of \n. (Remember - having a standard multiline output from a plugin only the first line will be displayed in the overwiew window. The rest is with the details view).

The HTML tags must be filtered out before using the output in notifications like an email. sed will do the job:

sed 's/<[Bb][Rr]>/&\n/g' | sed 's/<[^<>]*>//g'

Example for Nagios/Icinga 1.x:

# 'notify-by-email' command definition
define command{
	command_name	notify-by-email
	command_line	/usr/bin/printf "%b" "Message from Nagios:\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTNAME$\nHostalias: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $SHORTDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n$LONGSERVICEOUTPUT$" | sed 's/<[Bb][Rr]>/&\n/g' | sed 's/<[^<>]*>//g' | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
	}

If you are using Icinga 2, you need to adjust the notification scripts.

Using Open VM Tools

VMware recommends using the Open VM Tools (https://github.com/vmware/open-vm-tools) instead of host deployed tools. According to pkgs.org (http://pkgs.org/download/open-vm-tools) these tools are available for most Linux systems. For SLES you find them via https://www.suse.com/communities/conversations/free_tools/installing-vmware-tools-easy-way-osp/.

"VMware Tools is installed, but it is not managed by VMware" is now quite ok for package based Linux installation, but for all other systems (like MS Windows) this will cause a warning because it's not ok.

Therefore I implemented a new option --open-vm-tools.

But how to handle it in a command definition? Two defintions (one for Linux, one for the rest?

No - we handle this option over to the command as an argument:

define command{
        command_name    check_vshpere_tools_state
        command_line    /MyPluginPath/check_vmware_esx.pl -D $DATACENTER_HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -S runtime -s tools $ARG3$
        }

Service check for Linux:

define service{
       ....
       .
       .
       .
       .....
       check_command                   check_vsphere_tools_state!Nagios!MyMonitorPassword!"--open-vm-tools"
       }

Service check for the rest:

define service{
       ....
       .
       .
       .
       .....
       check_command                   check_vsphere_tools_state!Nagios!MyMonitorPassword
       }

So you can see in the second definition $ARG3$ is empty and therefore the option ist not set.

Using a session file

To reduce amounts of login/logout events in the vShpere logfiles or a lot of open sessions using sessionfiles the login part has been totally rewritten with version 0.9.8.

Using session files is now the default. Only one session file per host or vCenter is used as default. The sessionfile name is automatically set to the vSphere host or the vCenter (IP or name - whatever is used in the check). The file will only update if the session get invalidated at some point.

Multiple sessions are possible using different session file names. To form different session file names the default name is enhanced by the value you set with --sessionfile.

--sessionfile is now optional and only used to enhance the sessionfile name to have multiple sessions.

Example command and service check definition:

define command{
       command_name    check_vsphere_health
       command_line    /MyPluginPath/check_vmware_esx.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -S runtime -s health
       }


define service{
       active_checks_enabled           1
       passive_checks_enabled          1
       parallelize_check               1
       obsess_over_service             1
       check_freshness                 0
       notifications_enabled           1
       event_handler_enabled           1
       flap_detection_enabled          1
       process_perf_data               0
       retain_status_information       1
       retain_nonstatus_information    1
       
       host_name                       vmsrv1
       service_description             Health
       is_volatile                     0
       check_period                    24x7
       max_check_attempts              5
       normal_check_interval           5
       retry_check_interval            1
       contact_groups                  sysadmins
       notification_interval           1440
       notification_period             24x7
       notification_options            c,w,r
       check_command                   check_vsphere_health!Nagios!MyMonitorPassword
       }

Example for session file name and lock file name:

192.168.10.12_session (default)
192.168.10.12_session_locked (default)

Example caommand and service check definition (enhenced):

define command{
       command_name    check_vsphere_health
       command_line    /MyPluginPath/check_vmware_esx.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -S runtime -s health --sessionfile=$ARG3$
       }


define service{
       active_checks_enabled           1
       passive_checks_enabled          1
       parallelize_check               1
       obsess_over_service             1
       check_freshness                 0
       notifications_enabled           1
       event_handler_enabled           1
       flap_detection_enabled          1
       process_perf_data               0
       retain_status_information       1
       retain_nonstatus_information    1
       
       host_name                       vmsrv1
       service_description             Health
       is_volatile                     0
       check_period                    24x7
       max_check_attempts              5
       normal_check_interval           5
       retry_check_interval            1
       contact_groups                  sysadmins
       notification_interval           1440
       notification_period             24x7
       notification_options            c,w,r
       check_command                   check_vsphere_health!Nagios!MyMonitorPassword!healthchecks
       }

Example for session file name and lock file name:

192.168.10.12_healthchecks_session (enhenced)
192.168.10.12_healthchecks_session_locked (enhenced)

Optional a path different from the default one can be set with --sessionfilename=<directory>.

Storage

The module host_storage_info.pm (contains host_storage_info()) is a extensive rewrite. Most of the code was rewritten. It now tested with iSCSI by customers and it is reported to run without problems.

Multipath:

The original version was as buggy and misleading as a piece of code can be. A threshold here was absolute nonsense. Why? At top level is a LUN which has a SCSI-ID. This LUN is connected to the storage in a SAN with a virtual path called a multipath because it consists of several physical connections(physical paths). I f you break down the data deliverd by VMware you will see that in the section for each physical path the associated multipath with it's state was also listed. check_vmware_api.pl (and check_esx3.pl) counted all those multipath entry. For example if you had 4 physical paths for one multipath the counted 4 multipaths and checked the multipath state. This was absolute nonsense because (under normal conditions) a multipath state is is only dead if all physical paths (4 in the example) are dead.

The new check checks the state of the multipath AND the state of the physical paths. So for example if you have two parallel FC switches in a multipath environment and one is dead the multipath state is still ok but you will get an alarm now for the broken connection regardless if a switch, a line or a controller is broken.

This is much more detailed then counting lines.

History

Why a fork? According to my personal unterstanding of Nagios, Icinga, etc. are tools for

a) Monitoring and alarming. That means checking values against thresholds (internal or handed over) b) Collecting performance data. These data, collected with the checks, like network traffic, cpu usage or so should be interpretable without a lot of other data.

Athough check_vmware_api.pl is a great plugin it suffers from various things. a) It acts as a monitoring plugin for Nagios etc. b) It acts a more comfortable commandline interfacescript. c) It collects all a lot of historical data to have all informations in one interface.

While a) is ok b) and c) needs to be discussed. b) was necessary when you had only the Windows GUI and working on Linux meant "No interface". this is obsolete now with the new webgui.

c) will be better used by using the webgui because historical data (in most situations) means adjusted data. Most of these collected data is not feasible for alerting but for analysing performance gaps.

So as a conclusion collecting historic performance data collected by a monitored system should not be done using Nagios, pnp4nagios etc.. It should be interpreted with the approriate admin tools of the relevant system. For vmware it means use the (web)client for this and not Nagios. Same for performance counters not self explaining.

Example: Monitoring swapped memory of a vmware guest system seems to makes sense. But on the second look it doesn't because on Nagios you do not have the surrounding conditions in one view like

  • the number of the running guest systems on the vmware server.
  • the swap every guest system needs
  • the total space allocated for all systems
  • swap/memory usage of the hostcheck_vmware_esx.pl
  • and a lot more

So monitoring memory of a host makes sense but the same for the guest via vmtools makes only a limited sense.

But this were only a few problems. Furthermore we had

  • misleading descriptions
  • things monitored for hosts but not for vmware servers
  • a lot of absolutely unnesseary performance data (who needs a performane graph for uptime?)
  • unnessessary output (CPU usage in Mhz for example)
  • and a lot more.

This plugin is old and big and cluttered like the room of my little son. So it was time for some house cleaning. I try to clean up the code of every routine, change things and will try to ease maintenance of the code.

The plugin is not really ready but working. Due to the mass of options the help module needs work.

See history for changes

One last notice for technical issues. For better maintenance (and partly improved runtime) I have decided to modularize the plugin. It makes patching a lot easier. Modules which must be there every time are included with use, the others are include using require at runtime. This ensures that only that part of code is loaded which is needed.

Thanks

  • op5 for the original plugin
  • Sven Nierlein
  • Simon Meggle
  • Riccardo Bartels for additional work and creating a "monster" pull request merging a lot of others
  • Everyone contributing their time for feedback, patches and issue reports

Contributing

There are many ways to contribute to check_vmware_esx -- whether it be sending patches, testing, reporting bugs, or reviewing and updating the documentation. Every contribution is appreciated!

check_vmware_esx's People

Contributors

6uellerbpanda avatar baldmansmojo avatar bb-ricardo avatar curropar avatar datamuc avatar galipolix avatar insertusrname avatar lausser avatar lazyfrosch avatar manfredw avatar napsty avatar sni avatar velociraptor85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

check_vmware_esx's Issues

Sessionfile uses hardcoded path

The --sessionfile Option uses /var/nagios_plugin_cache as a hardcoded part of the path where it puts its sessionfiles.

While I like to comnfort of just having to give a name and the plugin deals with the rest of the sessionfile issues I really would appreciate some (upgradesafe) way to control where the sessionsfiles are put.

Can't run check_vmware_esx

Hi,

When I try to run check_vmware_esx.pl, I get that:

Unable to create session lock file "/var/nagios_plugin_cache/192.168.4.77_session_locked"

Can somebody help me please ? It would be greatly appreciated.

Thanks !

Can't locate help.pm

Hey,

Wonder if you can help, have been having issues with the plugin. I have installed all the pre-requesites as far as I can tell but cannot seem to get the plugin to run. The message I am getting is about a missing help.pm? But when looking on the web/cpan I cannot seem to find a help.pm module?

The error message is as follows:

./check_vmware_esx.pl

Possible precedence issue with control flow operator at /usr/local/lib/perl5/5.20.0/VMware/VICommon.pm line 2147.
Can't locate help.pm in @inc (you may need to install the help module) (@inc contains: modules /usr/local/lib/perl5/site_perl/5.20.0/x86_64-linux /usr/local/lib/perl5/site_perl/5.20.0 /usr/local/lib/perl5/5.20.0/x86_64-linux /usr/local/lib/perl5/5.20.0 .) at ./check_vmware_esx.pl line 1171.
BEGIN failed--compilation aborted at ./check_vmware_esx.pl line 1171.

Many Thanks

Colin England

Option --trace

Wenn ich die Option auf irgendetwas setze, zB. --trace=3 bekomm ich immer die Meldung

"Option trace does not take an argument"

Volumes check / thresholds

The volumes check is not accepting absolute values for freespace against multiple volumes, while it is possible in check_vmware_api.pl. This is kind of useful when you're working with volumes of different size.

Additionally the thresholds doesn't seem to work properly.

  • It seems to count all volumes matching the expression even if only one breaks a threshold
  • When using freespace it should check whether the values are below the thresholds not above

High Load

Hi,
Since the last git pull i see this errors:
Can't kill a non-numeric process ID at /usr/lib/nagios/plugins/check_vmware_esx/check_vmware_esx.pl line 1550.

my load on the icinga2 server ist now at 95 (ubuntu lts 14)

Anything is wrong here? Reboot etc has no effect.

best,
Dennis

runtime vmtools check vcenter, hide powered off

Hi Martin,

wäre es möglich (bzw. ist es überhaupt so gewollt) bei der Prüfung der VMware Tools eine Möglichkeit einzubauen ausgeschaltete VMs nicht anzuzeigen? Eine Alarmierung für "Powered Off" VMs erfolgt sowieso nicht, die Anzeige der ausgeschalteten VMs kann man ebenfalls über listvms (-S runtime -s listvms --alertonly) sehen. Sobald der Status der Prüfung auf ein Warning geht, muss ich aktuell Zeile für Zeile der Ausgabe durchgehen um das "Warning zu erkennen".

Beispiel, 2 VMware Tools "not installed", in der Ausgabe werden aber trotzdem alle "Powered Off" VMs angezeigt: "-S runtime -s tools --alertonly"

Warning! 108 VMs - 83 Installed,running and current. - 0 Installed,running,but the installed version is known to have a grave bug and should be immediately upgraded - 0 Installed,running,version is not current - 0 Installed,running,supported and newer than theversion available on the host - 0 Installed,running,supported, but a newer version is available - 0 Installed,running,but the version is known to be too new too new to work correctly with this virtual machine - 0 Installed,running,but the version is too old - 0 Installed,running,but not managed by VMWare - 0 Tools starting - 0 Tools not running - 2 Tools not installed - 0 No information about VMware tools available. - 14 Powered off. Tools not running - 0 Suspended. Tools not running
VM1 powered off. Tools not running.
VM2 powered off. Tools not running.
VM3 powered off. Tools not running.
VM4 powered off. Tools not running.
VM5 powered off. Tools not running.
VM VM6 Tools not installed.
VM VM7 Tools not installed.

VM8 powered off. Tools not running.
VM9 powered off. Tools not running.
VM10 powered off. Tools not running.
VM11 powered off. Tools not running.
VM12 powered off. Tools not running.
VM13 powered off. Tools not running.
VM14 powered off. Tools not running.
VM15 powered off. Tools not running.
VM16 powered off. Tools not running.

Danke & Gruß
René

-V / --version not working

Hi,

Just a small itch but I wanted to report it nonetheless.

I just cloned your plugin and installed the VMWare Perl SDK. When I run the plugin with -V oder --version all I get as an output is:

Unknown option: V
Provide either Password/Username or Auth file or Session file

Sorry for typos in the output but I can't use copy&paste right now.

This is no big deal because the version is part of the --help output anyway.

Impossible to set warning/critical tresholds for the volumes check

At first, thansk for this great plugin! ./check_vmware_api.pl is really not useful in prod env...

As I care about the free space on the volume and less free space is worse, it should be possible to set the critical treshold to be lower than warning treshold? Or I'm I missing something here?

$ ./check_vmware_esx.pl -H 1.2.3.4 -f vmware_authfile -S volumes -s vmware_1 --gigabyte -w 10% -c 5%
ERROR! Warning should not be greater or equal than critical

Nagiosxi issue

Runs fine from command line, but XI throwing httpd error
Can't call method "datastore" on an undefined value at /usr/local/nagios/libexec/check_vmware_esx.pl line 2695.

Returns null in XI interface

/usr/local/nagios/libexec/check_vmware_esx.pl -D xx.xx.xxx.xxx -f /usr/local/nagios/libexec/chek_vmware_config_vcenter01 -C "clustername" --select=volumes --usedspace --multiline -w 90% -c 95%

Parameter usedspace is ignored

Parameter usedspace is ignored on volume checks being a local variable instead of a global variable. Changing it from my to our fixes it and everything works fine.

Blacklisting feature for host --select=net

Hello,
our vmware admin told me, that we have a nic (vusb0) on all of our esx servers. This nic is always connected to a vswitch, but is not physically connected. He also cant detach this nic from the vswitch.
It would be nice to have some nic blacklist feature for this particular case.
It it possible to do that?

thanks for this nice plugin
Marcel

Maximum for perdata vmcount

The cluster check --select=runtime shows who many of how many VMs are running and gives the running count as performance data. A customer where I can test your plugin needs a way to graph the total amount of existing VMs. Maybe this could be put out as the Maximum value or a second value?

VMFS Volumes with blacklist or % threshold

/usr/lib64/nagios/plugins/vmware/check_vmware_esx.pl -D DATACENTER --sessionfile DATACENTER_1395067327 -u USER -p PASSWORD -S volumes --isregexp --exclude='vmfs_mz_mz,vmfs_da_mz,vmfs_mz_pr,vmfs-arcafsp,vmfs-mq-[0-9],vmfs-mq-big-[0-9],vmfs-mq-exdb,vmfs-mq-exlog,vmfs-mq-file,vmfs-mq-iso,vmfs-mq-view,vmfs-fbs,vmfs-mq-dmz-01,vmfs-mq-exrestore' -w 10% -c 5%

There is enough free on those volumes, but as i see in performancedata its not used as percent or some miss maths in script.

Critical! 21 alerts found for some for the selected volumes (warn:10%,crit:5%).
local_mqriesx10 (VMFS) free: 133583.00 / 134144.00 MB (100%)
local_mqriesx11 (VMFS) free: 133583.00 / 134144.00 MB (100%)
local_mqriesx13 (VMFS) free: 133583.00 / 134144.00 MB (100%)
local_mqriesx12 (VMFS) free: 133583.00 / 134144.00 MB (100%)
local_mqriesx14 (VMFS) free: 133583.00 / 134144.00 MB (100%)
l(100%)|'local_mqriesx10'=133583.00MB;10;5;;134144.00 'local_mqriesx11'=133583.00MB;10;5;;134144.00 'local_mqriesx13'=133583.00MB;10;5;;134144.00 'local_mqriesx12'=133583.00MB;10;5;;134144.00 'local_mqriesx14'=133583.00MB;10;5;;134144.00

Help request - Storage health status unavailable

Hello,

I know this is not exactly a issue report, but I don't know how else to ask for help...

I'm monitoring vCenter infrastructure using this script and having trouble with storagehealth check on 3 out of 7 ESXi hosts. The check definition is "check_vmware_esx.pl -H $HOSTADDRESS$ -f /usr/local/nagios/libexec/vmware_authfile -S runtime -s storagehealth"
Returning UNKNOWN status with output: "Storage health status unavailable" Its not a permission issue as other checks(MEM/CPU/IO) work just fine on all hosts. I'm stuck and no clue where to go to investigate further. I'd open a support request to VMWARE but not sure what to ask for :)

Thanks for any help!

Sessionfile does not get refreshed

Hi!

I'm using the sessionfile for various checks at a customers. Sometimes it seems the session gets invalid and all checks become critical because they can't login any more.

I haven't looked at the code, but shouldn't the plugin drop the sessionfile when it can't login and use the login data provided to create a new sessionfile?

I'm using the "$HOSTADDRESS$" Macro as a name for the sessionfile because the VMware guy complained that there are far too many sessions when I stick to the documentation and use a combination of hostname and servicename. Could that be the cause for the issue?

Thanks for your help.
Kind regards,
Thomas

Undefined subroutine &Vim

Hi,

When i try to use the tool, i have this error
Undefined subroutine &Vim::unset_logout_on_disconnect called at ./check_vmware_esx.pl line 1749.
I run version 0.9.22

./check_vmware_esx.pl -H X.X.X.X -u nagios -p mypassword -S cpu

what kind of infos did you need further?

Regards
marcel

CPU command do not work

/usr/lib/nagios/plugins/check_vmware_esx/check_vmware_esx.pl -H 192.168.0.1 -u myuser -p pass -S cpu
CPU wait=Not available - CPU ready=Not available - CPU usage=Not available

None of my server are getting the CPU usage with your fork.

On the orginal it works correctly:
/usr/lib/nagios/plugins/check_vmware_api.pl -H 192.168.0.1 -u myuser -p pass -l cpu
CHECK_VMWARE_API.PL OK - cpu usage=8859.00 MHz (41.63%) | cpu_usagemhz=8859.00MHz;; cpu_usage=41.63%;;

Incorrect output of a volumes check in case single volume is selected

When sing volume check is done, I can see in the output "For all volumes:" even though it should not be there I presume?

./check_vmware_esx.pl -H 1.2.3.4 -f vmware_authfile -S volumes -s vmware_1
For all volumes:
vmware_1 (VMFS) free: 146992.00 / 856576.00 MB (17%)|vmware_1=146992.00MB;;;;856576.00

Can't call method "cpuStatusInfo"

Can't call method "cpuStatusInfo" on an undefined value at ../modules/host_runtime_info.pm line 230.

Tested the script on eight ESX Servers - only on one host the issue appears. I can't imagine why. Perhaps you can find anything.

Wrong ip for DC / VCenter gives "Host does not exist" when checking host via vcenter

I check hosts by giving the VCenter ip via -D option. I forgot to fill the ip variable before exporting so -D had no value and the old plugin gives the error "Error connecting to server at 'https://:443..." but the new plugin says "Host [hostname] does not exist". Where hostname is the name of the host I wanted to check, not the VCenter.

500 read timeout

Hello,

I try to monitor a new esxi 5.5 U2. But I get the following message:
time ./check_vmware_esx.pl -H 192.168.4.6 -u nagios -p XXX -S CPU -s usage --trace=100
SOAP request error - possibly a protocol issue: 500 read timeout
real 6m52.893s
user 0m0.257s
sys 0m0.027s

And I have quite high timeout values I think.
On ESXi side I see some messages like "User Nagios loged in as VI Perl".

I'm using VMware-vSphere-Perl-SDK-5.5.0-2043780

Do you have any Idea?
Thanks for your help!

--select=storage on Host shows 0 LUNs ok although they are present

I'm comparing the results of this and the "old" plugin. While the old one shows "5/5 LUNs ok", the new shows "0/5 LUNs ok". Both are in "Unkown" state which should result from unreadable Storage Adapters (both plugins show "2/7 storage adapters online" which I can get rid of with your great --ignore_unknown switch what turns the new plugin to "Ok" state although the 0/5 LUNs persist (as expected because as far as I understand the --ignore_unknown only deals with storage adapter or at least turns "Unknown" into Ok but all LUNs missing should still result in a critical condition.)

The VMWare guys tell me, that the LUNs are in fact ok.

Perfdata shows LUNs=0

exclude runtime issue with activated SSH Deamon

Hi i got a small issue with your great new plugin

I try to ignore the Errors about Activated SSH Deamons on my ESX Servers.

./check_vmware_esx.pl -H 192.168.0.1 -u root -p mypass -S runtime -s issues
Critical! 1 config issues - 0 config issues ignored
Host "xxx.myhost.net" : SSH for the hostxxx.myhost.net has been enabled

./check_vmware_esx.pl -H 192.168.0.1 -u root -p mypass -S runtime -s issues --exclude=SSH --isregexp

Output:
Critical! 1 config issues - 1 config issues ignored

Why this will be showed as critical when i am ignoring it?

The old orignal script could be used with:
/usr/lib/nagios/plugins/check_vmware_api.pl -H 192.168.0.1 -u root -p mypass -l runtime -s status -x RemoteTSMEnabledEvent

And ignored the SSH warning and shows:
CHECK_VMWARE_API.PL OK - No config issues

check volumes not showing correctly in nagios webinterface

Hello,

first of all many thanks for the great plugin...
I got it running but unfortunately the "volumes" check isn't running 100% correct.

If I'm running the command (/usr/bin/perl ./check_vmware_esx.pl -f /usr/local/nagios/libexec/check_vmware_esx.txt -H x.x.x.x -S volumes --gigabyte -w 20% -c 10% --exclude local_xxx)
n the commandline I get the correct result. (a few volumes aboive and below the thresholds)

In the Nagios webinterface all it shows is:

OK for selected volume(s).

Volumes above thresholds:

Volumes below thresholds:

My nagios commands looks like this:

commands.cfg:
define command{
command_name check_esx_datastores
command_line /usr/bin/perl $USER1$/check_vmware_esx.pl -f /usr/local/nagios/libexec/check_vmware_esx.txt -H $HOSTADDRESS$ -S $ARG1$ --gigabyte -w $ARG2$ -c $ARG3$ --exclude local_esxk01
}

host.cfg

define service{
use generic-service-60m
host_name xxxx
service_description __Disk Usage
check_command check_vmware_esx!volumes!20%!10%
}

I dunno if that's an error or I just did a mistake. But I would appreciate if you could point me to the right direction :)

Thanks in advance.

Best regards,
Rene

storagehealth with esx 5.5

Hi,
i dont know what the problem is but i have problems using the
runtime storagehealth with ESX 5.5 installations.

./check_vmware_esx.pl -H 192.168.0.1 -u root -p mypass -S runtime -s storagehealth
Storage health status unavailable

on older ESX Versions i get all infos:
All 19 Storage health checks are GREEN.
Ok: Status of Drive 7 in enclosure 8 on controller 0 Fw: S229 - ONLINE - HotSpares (65535): Physical element is functioning as expected
Ok: Status of Drive 6 in enclosure 8 on controller 0 Fw: S229 - ONLINE - HotSpares (65535): Physical element is functioning as expected
Ok: Status of Drive 5 in enclosure 8 on controller 0 Fw: S229 - ONLINE - HotSpares (65535): Physical element is functioning as expected
Ok: Status of Drive 1 in enclosure 8 on controller 0 Fw: S207 - ONLINE - HotSpares (65535): Physical element is functioning as expected
Ok: Status of RAID 5 Virtual Disk 0 Logical Volume 0 on controller 0, Drives(0e8,1e8,7e8) - OPTIMAL: Physical element is functioning as expected
Ok: Status of Port 3 on Controller 0: Physical element is functioning as expected
Ok: Status of Drive 4 in enclosure 8 on controller 0 Fw: S229 - ONLINE - HotSpares (65535): Physical element is functioning as expected
Ok: Status of Controller 0 (PERC 5/i Integrated): Physical element is functioning as expected
Ok: Status of RAID 5 RAID5-II Logical Volume 1 on controller 0, Drives(4e8,5e8,6e8) - OPTIMAL: Physical element is functioning as expected
Ok: Status of Battery on Controller 0: Physical element is functioning as expected
Ok: Status of Drive 0 in enclosure 8 on controller 0 Fw: S207 - ONLINE - HotSpares (65535): Physical element is functioning as expected
Ok: Status of Port 4 on Controller 0: Physical element is functioning as expected
Ok: Status of Port 1 on Controller 0: Physical element is functioning as expected
Ok: Status of Port 2 on Controller 0: Physical element is functioning as expected
Ok: Status of Port 5 on Controller 0: Physical element is functioning as expected
Ok: Status of Drive 3 in enclosure 8 on controller 0 Fw: FS64 - HOT SPARE: Physical element is functioning as expected
Ok: Status of Port 7 on Controller 0: Physical element is functioning as expected
Ok: Status of Port 0 on Controller 0: Physical element is functioning as expected
Ok: Status of Port 6 on Controller 0: Physical element is functioning as expected

Information about peripherals with threshold!

Hi,
after define command and service in Nagios in this way:

define command{
command_name cpu_esxi_disk
command_line $USER1$/check_vmware_esx.pl -H $HOSTADDRESS$ -u $USER10$ -p $USER11$ -s $ARG1$ -s $ARG5$ -N $ARG4$ -w $ARG2$ -c $ARG3$
}

define service{
use vmware-service
host_name srv-voip
service_description disk
check_command cpu_esxi_disk!volumes!80!90
}

on web-interface it show only that service is OK and that the used space is under threshold but without show me the used space and the total space.
It is normal or I wrong some configuration??

schermata da 2015-02-23 12 09 48
schermata da 2015-02-23 12 09 56

It is possible to have all information about volumes && the threshold??
Regards
GD

Wrong units in volumes perfdata output

Hi,

When I run check_vmware_esx 0.7.1 only with "-D" and "-f" and "--select=volumes" I get performance data like:

[volume_name]=[used space]%:MB;;;;

so graphing Software like pnp4nagios can't deal with it. I think you should remove the "%:" part from it.

Undefined subroutine &Vim::unset_logout_on_disconnect called at ./check_vmware_esx line 8035.

Maybe you can help me ...
[nagios@nagios plugins]$ ./check_vmware_esx -f /home/nagios/authfile -D 10.0.0.1 -S runtime -s listvms
Undefined subroutine &Vim::unset_logout_on_disconnect called at ./check_vmware_esx line 8035.
[nagios@nagios plugins]$ ./check_vmware_esx -f /home/nagios/authfile -D 10.0.0.1 --select=soap
Undefined subroutine &Vim::unset_logout_on_disconnect called at ./check_vmware_esx line 8035.

When i do something, like that :
./check_vmware_esx -f /home/nagios/authfile -D 10.0.0.1 -N VMNAME -S cpu -s usage
VMware machine VMNAME does not exist
./check_vmware_esx -f /home/nagios/authfile -D 10.0.0.1 -S runtime
There are no VMs.

I have install "VMware-vSphere-Perl-SDK-5.5.0-2043780.x86_64.tar.gz"
My vCenter is "5.5.0 U2b R2183111"
I use "compiled version" with MakeFile and ".pl" version with export "modules/", same result.

If i use "check_vmware_api.pl" it's work ... But logs in BDD is amazing (~700 checks/5 minutes)

Any idea ?
Thx for your job :)

Volumes and Health check / Warning when in Maintenance Mode

The volumes check against a host results in a Warning, when the host is set into maintenance mode:

/apps/omd/libexec/check_vmware_esx.pl -H HOST -u USER -p PASS -S volumes --gigabyte
Current Status: WARNING (for 0d 0h 13m 2s)
Status Information: Notice: HOST is in maintenance mode, check skipped

Typing Error dc_runtime_info.pm:660

Hi Martin,

nach der Präsentation auf der osmc habe ich das Plugin nun mal in der aktuellen Version 0.9.7 - 0.9.9 getestet. Eine kleine Sache ist mir aufgefallen:

vCenter runtime all Check:

Use of uninitialized value $vc_yellow_out in concatenation (.) or string at /infra/icinga/plugins/modules/dc_runtime_info.pm line 660.

Fehler: "vc_yellow_out" anstatt "vc_yellow_cnt" im Modul "_dc_runtime_info.pm":

Line 660:
$output = $output . $vc_yellow_cnt . "/" . @$dc_views . " Vcenters yellow - ";

Btw. klasse Plugin, "check_vmware_api" wird dann bei uns damit ersetzt.

Ansonsten bekomme ich noch in Version 0.9.9 "UNKNOWN: Script timed out."
Aber das muss ich mir erst mal genauer anschauen bevor ich dazu etwas sagen kann, es scheint so als werden zwar jetzt die Lockfiles entfernt falls der Prozess nicht mehr läuft aber die Checks laufen bei mir in einen Timeout.

Gruß
René

Non existent cluster name cause script error

When passed a non existent cluster as param, the script return a script error

/tmp/check_vmware_esx/check_vmware_esx --authfile /tmp/check_vmware_esx/auth --datacenter 192.168.X.X --cluster WrongName --sessionfile check-vmware-esx.session --sessionfiledir /tmp --timeout 90 -S runtime
Can't use string ("WrongName") as a HASH ref while "strict refs" in use at /tmp/check_vmware_esx/check_vmware_esx line 8780.

/tmp/check_vmware_esx/check_vmware_esx --authfile /tmp/check_vmware_esx/auth --datacenter 192.168.X.X --cluster Cluster --sessionfile check-vmware-esx.session --sessionfiledir /tmp --timeout 90 -S runtime
18/24 VMs up, overall status=green, no config issues|vmcount=18;;;;

Size of volume in perfdata

Could the size of the volumes be integrated into the performancedata of --select=volumes ? The main reason is to have a one-look overview of how much space is left through graphing software without having to login to VCenter but you could have some sort of historical view on datastore size as well.

Possible improvoment/extension - Grouping of vm counts when doing runtime/listvm on vcenter

VM names:
EWDXXX-JNK1-name1(UP)
EWDXXX-DEV1-name2(UP)
EBI0091-DEV2_CR1-name3(UP)
EWD288-DEV-name3(UP)
EWI112-DEV1_CR3-name1(UP)
EWDXXX-VAL-name2(UP)
Output:
Total: 6 EWDXXX:3, EWD288:1, EBI0091:1, EWI112:1
including the perf data

Just in case someone is interested, the patch content is below:
--- ./check_vmware_esx.pl 2014-01-03 15:27:14.000000000 +0100
+++ ./check_vmware_esx.pl.orig 2014-01-03 14:59:00.000000000 +0100
@@ -1906,58 +1906,6 @@
$state = check_against_threshold($up);
}
}

  •            # ADDED BY VSAFAR 3.1.2014  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
  •            elsif ($subselect eq "groupvms")
    
  •            {
    
  •                    my %vm_state_strings = ("poweredOn" => "UP", "poweredOff" => "DOWN", "suspended" => "SUSPENDED");
    

- my $vm_views = Vim::find_entity_views(view_type => 'VirtualMachine', properties => ['name', 'runtime', 'config']);

  •                    if (!defined($vm_views))
    
  •                       {
    
  •                       print "Runtime error\n";
    
  •                       exit 2;
    

- }

  •                    if (!@$vm_views)
    
  •                       {
    
  •                       print "There are no VMs.\n";
    
  •                       exit 2;
    

- }

  •                    my %vmgroups = ();
    
  •                    my $vmgroup='';
    
  •                    $output = '';
    
  •                    $state = 0;
    

- my $cnt=0;

  •                    foreach my $vm (@$vm_views) {
    

- my $vm_state = $vm_state_strings{$vm->runtime->powerState->val};

  •                            if ($vm->config->template != 1){
    
  •                              $cnt++;
    
  •                              if($vm->name =~ m/([\d\w]+)-[\d\w_.]+-[\d\w]/) {
    
  •                                   #print "The first digit is $1 - ".$vm->name."\n";
    
  •                                print "Template - ".."\n";
    

- $vmgroups{$1} +=1;

  •                              }else{
    
  •                                #print $vm->name."\n";
    
  •                                $output = 'Image name not understood: '.$vm->name.' ';
    
  •                                $state = 2;
    
  •                              }
    
  •                            }
    

- }

  •                    $output = $output . "Total:".$cnt." , ";
    

- $perfdata = $perfdata . "Total=".$cnt.";;; ";

  •                    foreach $vmgroup (sort keys %vmgroups) {
    
  •                      $output = $output . $vmgroup . ":" . $vmgroups{$vmgroup} . ", ";
    
  •                      $perfdata = $perfdata . " ". $vmgroup. "=" . $vmgroups{$vmgroup} . ";;;";
    

- }

  •            }
    
  •            # ADDED BY VSAFAR 3.1.2014 -----------------------------------
             elsif ($subselect eq "listhost")
             {
                     my %host_state_strings = ("unknown" => "3", "poweredOn" => "UP", "poweredOff" => "DOWN", "suspended" => "SUSPENDED", "standBy" => "STANDBY", "MaintenanceMode" => "Maintenance Mode");
    

How do I debug status return information is "NULL" ?

Thanks for writing such great perl script.

When I first setting up, I was able to the graph(pnp4nagios) all my 40 datastores in a VMWare farm. But I as went further and messing around with my perl-SDK installation and normal_check_interval(5 to 1440 minutes). My Nagios WebGUI showing NULL status information.

Here is the screenshot.

image

But I am still able to run the commands manually using in shell and they returned capacity with metric information.

export USER1=path of check_vmware_esx
export  HOSTADDRESS=vcenter name
[nagios@nagios01 nagios]$ $USER1/check_vmware_esx  -D $HOSTADDRESS --authfile=/etc/nagios/vmware.nagios-adm  --gigabyte -w 2 -c 1  --select=volumes  --subselect=vmw\
are_templates
OK for selected volume(s).
Volumes above thresholds:
------------------------------------------------
Volumes below thresholds:
vmware_templates (NFS) free: 113.20 GB (23.83%) / 475.00 GB (100%)
|'vmware_templates'=113.20GB;2;1;;475.00
[nagios@nagios01 nagios]$

I would appreciate any pointer where is my mistake.

Cluster checks

Cluster checks for memory and cpu result all in a SOAP fault.
Also --help=cluster is a bit miss formated
Runtime and Storage working perfekt.

Uptime check / thresholds

Hi,

the uptime check currently doesn't support thresholds. We've been using the check_vmware_api.pl with thresholds for uptime to handle alarming in case of unwanted reboots. Adapted to this script, we get an error:

check_vmware_esx.pl -D VCENTER -u USER -p PW -H HOST -S uptime -w 259200: -c 1800:
Warning threshold contains unwanted characters: 259200:

This format should be supported:
https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT

Regards

Timouts with new sessionfile handling

Since latest release i get hundreds of timeouts.
I set seesionfile with --sessionfile $HOSTNAME$_$SERVICEDESC$ and it got a bit better but still hundreds of checks timeout (null) or go critical with exit code 255 ...

timeout is script is set too 300 and ms_ts to 1500

I/O per Cluster

A customer where I test your plugin needs for reporting purposes a sum of I/O metrics on a per cluster base. They share datastores between clusters and need to know what cluster needs what.

I found ways to check I/O on a per host and a per datacenter base. Did I just not see the per cluster section or is this not implemented? (didn't find it in the old plugin either).

Cluster commands error

/tmp/check_vmware_esx/check_vmware_esx --authfile /tmp/check_vmware_esx/auth --datacenter 192.168.X.X --cluster Cluster --sessionfile check-vmware-esx.session --sessionfiledir /tmp --timeout 90 -S cpu

SOAP Fault:
-----------
Fault string: A specified parameter was not correct. 
querySpec.interval
Fault detail: InvalidArgumentFault

/tmp/check_vmware_esx/check_vmware_esx --authfile /tmp/check_vmware_esx/auth --datacenter 192.168.X.X --cluster Cluster --sessionfile check-vmware-esx.session --sessionfiledir /tmp --timeout 90 -S mem

SOAP Fault:
-----------
Fault string: A specified parameter was not correct. 
querySpec.interval
Fault detail: InvalidArgumentFault

/tmp/check_vmware_esx/check_vmware_esx --authfile /tmp/check_vmware_esx/auth --datacenter 192.168.X.X --cluster Cluster --sessionfile check-vmware-esx.session --sessionfiledir /tmp --timeout 90 -S cluster

SOAP Fault:
-----------
Fault string: A specified parameter was not correct. 
querySpec.interval
Fault detail: InvalidArgumentFault

_Only runtime command work as expected_

/tmp/check_vmware_esx/check_vmware_esx --authfile /tmp/check_vmware_esx/auth --datacenter 192.168.X.X --cluster Cluster --sessionfile check-vmware-esx.session --sessionfiledir /tmp --timeout 90 -S runtime

18/24 VMs up, overall status=green, no config issues|vmcount=18;;;;

Storage pathes in standby

With some Storages (IBM DS 3500) It is ok when the second path is "standby", In V 0.95 it is a warning. There should be a switch that standby pathes are ok or generaly standby pathes should be ok.

No status returned...

Hi
When I try to get any Status on any of the checks vom the check_vmware_esx
i dont get a status back.
the old plug in got a status which i could use in my nagios3 to get a status...

example:
old:
check_esx3 -H 111.111.111.111 - u user - p password -l cpu - s usage - w 80 -c 90
CHECK_ESX3 OK - cpu usage =0.75 % | cpu_usage=0.75%;80;90

new:
check_vmware_esx.pl -H 111.111.111.111 - u user - password -S cpu -s usage -w 80 -c 90
CPU usage=0.74%|'cpu_usage'=0.74%;80;90;;

so in my opinion the Status is missing....
using the latest Version of the scrypt.
Ubuntu 12.04 - CLI 5.5 - Perl 5.14.2 - libwww-perl-5.837

Greetings from Switzerland
Alex

Problem with Nagios plugin check_vmware_esx.pl

Hi,
I tried your plugin from Debian server shell and it works excellent.
I've a problem when try to use this in Nagios. (I use nagios 3 on
Debian 7 and the vmware server has esxi 5.1)
After define the command and service in this way:

define command{
command_name cpu_esxi
command_line $USER1$/check_vmware_esx_
master/check_vmware_esx.pl -H
$HOSTADDRESS$ -N 1-CUP -u $USER10$ -p $USER11$ -S cpu -s usage
}

define service{
use generic-service
hostname srv-voip
service_description CPU VM
check_command cpu_esxi!
}

where $USER1$ is the path /usr/lib/nagios/plugins

...after restarting service nagios3, the output of STATUS INFORMATION
on web interface is:
(Service check did not exit properly)

I tried to change the command define in this way:

define command{
command_name cpu_esxi
command_line /usr/bin/perl
$USER1$/check_vmware_esx_master/check_vmware_esx.pl -H $HOSTADDRESS$
-N 1-CUP -u $USER10$ -p $USER11$ -S cpu -s usage
}

now, the STATUS INFORMATION output is:
(null)

...I have read that another guy had the same problem but you
answered him that is a setup configuration problem and not plugin
problem. Can you help me?

Greeting
GD

UNKNOWN: Script timed out.

Hi,

sometimes the script timed out on several checks. the ESX servers (about 20 currently) are not at heavy load. somethings seems to be here wrong. anything i could do here?

best,
dennis

longoutput (multiline) does not work for temperature sensor output

Seems that the longoutput of host -> runtime -> temp does not work in CheckMK/Nagios. The first line like All 0 temperature checks are GREEN. is shown like normal but the longoutput output is almost empty + performance data are empty too.

This is not a general bug, because longoutput and performance data for e.g. Datacenter -> Cluster -> Volumes works very well.

(executing this first check on commandline works)

Blacklist on host --select=net

My customer want's to use --select=net on their hosts where 2 questions came up:

  1. One host has 4 disconnected NICs, but the plugin shows just 1/9 NICs down. I assume this is because the other 3 NICs are not assigned to a switch? Only the "down" NIC is assigned to a switch.
  2. I tried to blacklist this NIC with --exclude=vusb0 or -B vusb0 but it didn't work. Is blacklisting not implemented for NICs? If so, do you plan on implementing it?

volumes $alertcnt++

Hello,
the variable $alertcnt++ is filled wrongly.
Not the "alert volumes" will be count, the "ok volumes" will be count.

Regards,
Philipp

Mail Notification for host health status (--select=runtime --subselect=health) are sent as attachment

Hello,
when the service Health Status (--select=runtime --subselect=health) gets to a warning or critical state, we get the mail notification as attachment. It only happens with this particular check.
Inside the attachment is the original message.

Our Service Notification Command:
/usr/bin/printf "%b" "Notification Type: $NOTIFICATIONTYPE$\n\n Service: $SERVICEDESC$\n Host: $HOSTALIAS$\n Address: $HOSTADDRESS$\n State: $SERVICESTATE$\n\n Date/Time: $LONGDATETIME$\n\n Additional Info:\n\n $SERVICEOUTPUT$\n" | /bin/mailx -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$

I have attached a screenshot.
attachment

This is the original messages inside the attachment:
Notification Type: PROBLEM

Service: ESX health status
Host: impesx01.emea.company.newyorker.de
Address: 192.168.20.1
State: WARNING

Date/Time: Thu Mar 6 15:43:15 CET 2014

Additional Info:

Warning! 1 health issue(s) found in 296 checks: 1) [Unknown] [Type: system] [Name: VMware Rollup Health State] [Label: Unbekannt] [Summary: Über den aktuellen Zustand des Elements kann nicht berichtet werden]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.