Very strange email alert problem (ESXi)

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
misterfigaro
Posts: 5
Joined: Wed Aug 07, 2013 3:18 am

Very strange email alert problem (ESXi)

Post by misterfigaro »

Hi guys, nagios is a must and works very well, but i have a very strange problem on email alert.

I added a new cfg file for my ESXi servers, below the esxi.cfg file

define host{
use virtual ; Name of host template to use
host_name esxi1_milan
alias ESXi Milan
address 10.0.0.15
}

define host{
use virtual ; Name of host template to use
host_name esxi1_london
alias ESXi London
address 10.0.0.10
}

define hostgroup{
hostgroup_name esxi
alias VMWare ESXi
members esxi1_milan,esxi1_london
}


define service{
use generic-service ; Name of service template to use
host_name esxi1_milan
service_description General Check
check_command check_esxi_hardware!<user>!<pwd>!<server_brand>
}

define service{
use generic-service ; Name of service template to use
host_name esxi1_london
service_description General Check
check_command check_esxi_hardware!<user>!<pwd>!<server_brand>
}



I found the script check_esxi_hardware in internet and works fine from command line, the script is available at http://www.claudiokuenzler.com/nagios-p ... rdware.php


the problem is that i had problem on london server but when i got email i can see the right ip address on alert but the MIlan server name..... how is possible?

If i go to the web interface everything if ok, all names and ip are correct.

My nagios version is Nagios® Core™ Version 3.2.3 October 03, 2010.

Can someone help me to fix?.

many thank in advance guys
misterfigaro
Posts: 5
Joined: Wed Aug 07, 2013 3:18 am

Re: Very strange email alert problem (ESXi)

Post by misterfigaro »

Googling i got this post:
http://www.claudiokuenzler.com/blog/179 ... alias-name

I tried but nothing happened.........
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Very strange email alert problem (ESXi)

Post by sreinhardt »

That does seem rather strange, provided your configurations have the correct IP below, and your services are using host_name for the host variable. Let's check your objects.cache file and verify that it feels your configurations are setup the way you think they should be. Also what OS and nagios version are you using?

grep -i -B 3 -A 5 ' esxi1_milan' /usr/local/nagios/var/objects.cache
grep -i -B 3 -A 5 ' esxi1_london' /usr/local/nagios/var/objects.cache

Let's also do a quick dns lookup from the nagios machine to be sure that it is getting the correct IP to name.

nslookup esxi1_london
nslookup esxi1_milan
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked