[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing • View topic - check_vmware: Nagios/MRTG plugin for VMware ESX

Cheshire Cat Computing

Software support and information
It is currently Wed Dec 03, 2025 11:10 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 177 posts ]  Go to page Previous  1 ... 14, 15, 16, 17, 18  Next
Author Message
 Post subject: Re: network checks
PostPosted: Wed Jun 27, 2012 9:05 am 
Offline
User

Joined: Thu Jun 21, 2012 6:28 am
Posts: 2
Thanks for the reply, I've sent your response up the chain, let's see what they want next!

Along those lines, they seem to think the network part can only warn/crit for what we would consider a slow network.

Instead of warn at 7680/10240, we want to use 76800 and 102400, yet those values return some crazy message about 0<foo

Again, what you've provided us so far is beyond what we were hoping for.



Dave


Top
 Profile Send private message  
 
PostPosted: Fri Jul 13, 2012 4:37 am 
Offline
User

Joined: Fri Jul 13, 2012 4:12 am
Posts: 2
I'm running vmware_check.pl 1.13 on nagios core Version 3.4.1
when executing commands like cpu usage, NAGIOS get status of (null), displaying WARNING on yellow, on nagios log I can see:

EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;vmwarehost5.domain.com;VMware Host Current CPU Usage;1342105062
THE value is 1342105062
if i run the command manually on console:

sudo /usr/local/nagios/libexec/check_vmware.pl --config=/usr/local/nagios/libexec/check_vmware_config_vcenter01 --host=vmwarehost5.domain.com --report=cpu --mode=nagios --warn=85 --crit=95

i get:
CPU usage at 30.76%|cpu=30.76%;85;95;0;100

I'm using service commands extracted from XI plugin, but running on NAGIOS CORE, does vmware_check.pl need any modification to run on NAGIOS CORE 3.4.1?

THANKS:

MY CONFIGS:

define service {
name xiwizard_vmware_host_cpu_usage
host_name null
hostgroup_name null
service_description VMware Host Current CPU Usage
servicegroups all_vmwareesxvsphere_services_cpu
check_command check_vmware_host!check_vmware_config_vcenter01!cpu!85!95
is_volatile 0
max_check_attempts 5
check_interval 5
retry_interval 1
active_checks_enabled 1
passive_checks_enabled 1
obsess_over_service 1
check_freshness 0
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
notification_interval 60
notifications_enabled 1
contacts null
contact_groups null
icon_image vmware_cpu.png
register 0
}



define command {
command_name check_vmware_host
command_line sudo $USER1$/check_vmware.pl --config=$USER1$/$ARG1$ --host=$HOSTADDRESS$ --report=$ARG2$ --mode=nagios --warn=$ARG3$ --crit=$ARG4$ $ARG5$ $ARG6$ $ARG7$ $ARG8$
register 1
}


Top
 Profile Send private message  
 
PostPosted: Fri Jul 13, 2012 5:05 am 
Offline
User

Joined: Fri Jul 13, 2012 4:12 am
Posts: 2
Finally solved, I've removed "sudo" from command line, and chmod +x all scripts

now works....!

great plugin!
thanks.


Top
 Profile Send private message  
 
PostPosted: Fri Jul 27, 2012 4:19 am 
Offline
User

Joined: Fri Jul 27, 2012 4:07 am
Posts: 2
Howdy) Got a trouble and realy need your help..

Have Vcenter server 5.0.0 and ESX 4.1.0

For vcenter everything works fine BUT unable to get plugin working with ESX host with non-root user

[root@sysmanage1 plugins]# ./check_vmware.pl --username=nagios --password=XXXXXXXX --server=10.237.195.175 --mode=nagios --report=memory
UNKNOWN: Login to VirtualCentre server failed: Permission to perform this operation was denied.

Firstly I have added user to vcenter and granted (read-only then tried administrators) permissions on it. With custom user it was returning
UNKNOWN: Login to VirtualCentre server failed: Cannot complete login due to an incorrect user name or password.
Once added nagios user into ESX from shell it returns permissions denied (see first error)

Found here that non-root users unable to execute administrator operations via SSH, not sure if it is related or not.
http://kb.vmware.com/selfservice/micros ... Id=2005299

So I am curious if maybe I can change perms for some executables for it to work correctly....?
I would really appreciate help. Please

P.S. I think it is not related to issue but statistics on level 1 for now.


Last edited by alexnadtoka on Fri Jul 27, 2012 4:35 am, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Fri Jul 27, 2012 4:25 am 
Offline
User

Joined: Fri Jul 27, 2012 4:07 am
Posts: 2
I just do not want root password to be stored on nagios server and do not know how to resolve above problem

Also not sure how to use your --guest key...(( if possible to get data without administrator username authentication at all this would be great.

BTW have you fixed the issue with net reporting? I saw it in previous discussion

# ./check_vmware.pl --username=root --password=17gp7sooCd --server=10.237.195.175 --mode=nagios --report=net

#


Top
 Profile Send private message  
 
PostPosted: Fri Jul 27, 2012 10:38 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand

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


Top
 Profile Send private message  
 
PostPosted: Fri Aug 03, 2012 10:41 pm 
Offline
User

Joined: Fri Aug 03, 2012 9:13 pm
Posts: 2
Hey Steve

What a great plugin ! It really made my job easier.
I've found a bug in your script. When disk checking the warning and critical limits are set as GB (from what i can read from the help text) but when you are doing the actual check you just subtract, say the limits are 3 and 5, the limits from the total disk space, as if they were bytes and not GB. So say i got a disk of 100 GB and a warning should occur at 95 GB used space, instead it occurs at 100GB - 5 bytes. I dont know if you should fix it at the diskcheck (line ~1000) or at the limit assignment (line ~1700).

Also it would be great if you add and option to display whether to show in bytes, MB, GB or TB and a options to choose whether to use the metric byte notation or binary notation.

One last thing, our nagios have some trouble running the script unless i wrap the scrip forcing it to use the server perl environment instead of nagios' own. The nagios -env flag doesn't seem to work. The odd thing is that i can run the script with no problems as the nagios user. I'm using nagios 2.12.

Best Regards
Christoffer Frost

EDIT:
I read that you were unsure if the vSphere/vCenter was using the metric or the binary notation for disks, i can confirm that our vSphere(on windows) is using the binary


Top
 Profile Send private message  
 
PostPosted: Mon Aug 06, 2012 6:15 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
Thanks for the feedback.

I've found that this script doesnt scale well when you have hundreds of guests, due to the inefficiencies of the VMware API.

So, I'm doing a big rewrite that will enable the script to normally run as a daemon, pulling info and pushing it into Nagios via NSCA for not only guests but also ESX servers and clusters. I'm also hoping it will be able to push RRD updates via rrdupdated for MRTG users, as well. The current version, 1.13, has NSCA support for running in daemon mode updating guests already.

If I remember correctly, the script checks freespace against CRITSPACE*1024000000, so the tests are correct (at least, in my version). However the perfdata string is wrong as it does indeed use $freespace-$CRITSPACE where it should multiply $CRITSPACE by 1024000000 first. I have version 1.13 of the script, so check your version in the code.

I have also noticed the problem with the EPN not liking the VMware API. I managed to use the '#nagios: -epn' option at the start of the script which fixed it for me without using a wrapper. Version 1.13 should have this in place as standard? I've not tested against Nagios 2.x, though, as we use 3.1 here; possibly the -epn option was not available under 2.x?

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


Top
 Profile Send private message  
 
PostPosted: Mon Aug 06, 2012 9:24 pm 
Offline
User

Joined: Fri Aug 03, 2012 9:13 pm
Posts: 2
Hey again

I'm currently using 1.13. My bad on the disk space, it's because i changed all the *1024000000 to 1024^3 to be consisten, so i figured that none of the WARN- and CRITSPACE were being multiplied.

But it doesn't seem that Nagios 2.x support the -epn flag. But to be honest it doesn't really matters that i have to wrap it. It would be a nice-to-have feature but not a need-to-have.


Top
 Profile Send private message  
 
PostPosted: Tue Sep 18, 2012 4:10 am 
Offline
User

Joined: Tue Sep 18, 2012 4:08 am
Posts: 1
Hi-
Im curious about two things here:

1. Does this script work with vSphere 5?
2. Is the net stuff working yet?

Thanks.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 177 posts ]  Go to page Previous  1 ... 14, 15, 16, 17, 18  Next

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


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

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