Cheshire Cat Computing

Software support and information
It is currently Tue May 21, 2013 7:53 am

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 175 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10 ... 18  Next
Author Message
PostPosted: Mon Nov 30, 2009 2:10 pm 
Offline
Silver User

Joined: Mon Sep 22, 2008 6:22 pm
Posts: 35
Thanks for the info Steve, the web console is enabled and working, and now I'm passing the user/pass in CLI the 'server status' and 'datastores' are both returning valid data.

Is there anything else I can query on standalone ESX/ESXi servers, other than 'disk' and 'status'?

I'm going to add a VC to the system in the next few days to compare the difference, but several of the systems we want to monitor are standalone (unfortunately).

What is the correct syntax to pass the user/pass as part of the config file please?

Finally, when running in Nagios, I'm still getting (Return code of 127 is out of bounds - plugin may be missing). Perl is installed on the server, but wasn't present when Nagios was compiled. Do you think I need to recompile either/both Nagios and Nagios-plugins with Perl modules enabled for this to work correctly?


Top
 Profile  
 
PostPosted: Mon Nov 30, 2009 9:29 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
You wont need to recompile Nagios - in fact, this plugin does not work with the Nagios EPN and if you do have the EPN enabled, it has to be specifically disabled for this script (see the comments at tyhe beginning of the script)

If you run the plugin with the -h option it gives all the available options, plus the names of the environment variables you can set in a separate configuration file which you specify with --confg

eg, in file vmconfig:
VI_SERVER=myesxserver
VI_USERNAME=myuser
VI_PASSWORD=foobarbaz

Then you can use something like:
check_vmware --config=vmconfig --mode=nagios --report=cpu --guest=guestname

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
PostPosted: Mon Nov 30, 2009 10:35 pm 
Offline
Silver User

Joined: Mon Sep 22, 2008 6:22 pm
Posts: 35
OK, thanks. I've tried configuring that way, but I'm still getting (Return code of 255 is out of bounds) - hey, at least the error has changed! lol


Here is my config:

commands.cfg

--snip---
# Check VMware ESX Host Status
define command{
command_name check_vmware_status
command_line /usr/local/nagios/libexec/check_vmware --config=vmconfig --mode-nagios --report=status
}
---/snip---

---esx.cfg---(called by nagios.cfg)
define hostgroup{
hostgroup_name esx-servers ; The name of the hostgroup
alias ESX Servers ; Long name of the group
members esx
}

define host {
use linux-server
host_name esx
alias ESX Server
address 10.0.0.2
}

#Check ESX Host Status
define service {
use generic-service
hostgroup esx-servers
service_description VMware: Status
check_command check_vmware_status
normal_check_interval 60
retry_check_interval 15
max_check_attempts 2
}
---/esx.cfg---

---vmconfig---
VI_SERVER=10.0.0.2
VI_USERNAME=root
VI_PASSWORD=password
---/vmconfig---


Any idea what has gone wrong? It's still OK from the shell.


Top
 Profile  
 
PostPosted: Tue Dec 01, 2009 2:14 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
Try running the command from the shell *as the Nagios user* -- sometimes, you may be testing as root but running in Nagios as the nagios user. There might be a permissions issue.

Also, make sure you are not using the EPN. If you have enabled this then disable it by adding the line
Code:
# nagios: -epn

as the second line in the file if it is not already there.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
PostPosted: Tue Dec 01, 2009 7:13 pm 
Offline
Silver User

Joined: Mon Sep 22, 2008 6:22 pm
Posts: 35
Hrmmm.....

It worked fine and returned valid data when logged on as the Nagios user. ???

Where should I include the -epn switch in the config?


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 3:06 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
comport3 wrote:
Where should I include the -epn switch in the config?


It goes at the top of the check_vmware script; it makes sure that the script is NOT run under the embedded perl interpreter, as it will not work with this. The Vmware library is not able to run in this sort of environment.

Steve

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 6:35 pm 
Offline
Silver User

Joined: Mon Sep 22, 2008 6:22 pm
Posts: 35
OK, thanks - I can't find the correct section of the script to add that line.

Any ideas why it runs from the command line, but not the Nagios web interface? Is it just the -epn switch I need to add to the script?


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 9:54 pm 
Offline
Silver User

Joined: Mon Sep 22, 2008 6:22 pm
Posts: 35
Hi Guys,

I think I'm going to try a different tack - I'm going to check this script using NSCA - any tips on config/setup?


Top
 Profile  
 
PostPosted: Fri Apr 02, 2010 7:53 pm 
Offline
User

Joined: Fri Apr 02, 2010 7:42 pm
Posts: 2
Hello All,

I learned few new thing from the threads. I still have few queries :
What type of custom reporting can you do with this? What type of data rollup happens?

Do you have any screen shots of ESX reports?

Thanks!

_________________
[url=http://www.bluelock.com]VM Ware[/url]


Top
 Profile  
 
PostPosted: Wed Apr 07, 2010 10:48 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
This is a plugin for MRTG and Nagios, so reporting is down to the abilities of those packages. Take a look in http://www.nagios.org and http://www.mrtg.org -- the MRTG can display via the Routers2 frontend which is fairly configurable http://www.steveshipway.org/cgi-bin/routers2.pl

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 175 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10 ... 18  Next

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group