LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-05-2013, 02:27 AM   #1
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Rep: Reputation: Disabled
check_esx_host_vmfs plugin issue while monitoring ESXi DS


Hello,

I setup a check_esx_host_vmfs plugin for monitoring datastore status on ESXi server. But on configuring this plugin, this is working fine but it displays "WARNING" status on UI of Nagios every time.
Currently my datastore size is 926.50 GB and right now free space available is 570.60 GB but still it showing warning on UI.

In command.cfg i mentioned the below one for this plugin.

PHP Code:
define command{
        
command_name check_esx_host_vmfs
        command_line $USER1
$/check_esx3 -H $HOSTADDRESS$ -u $USER11$ -p $USER12$ -l vmfs -w $ARG2$ -c $ARG3$

In my services.cfg file i defined the below lines to check the status of datastore using the above mentioned command.

PHP Code:
# check for datasource usage
define service{
        use                            
generic-service
        action_url                     
/nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$' onMouseOver='showGraphPopup(this)' onMouseOut='hi                                       deGraphPopup()' rel='/nagiosgraph/cgi-bin/showgraph.cgi?host=$HOSTNAME$&service=$SERVICEDESC$
        
host_name                      ESXiserver
        service_description            ESXi Datasource Usage
        is_volatile                    0
        check_period                   24x7
        max_check_attempts             3
        normal_check_interval          3
        retry_check_interval           1
        contact_groups                 vmwareadmins
        notification_interval          120
        notification_period            24x7
        notification_options           u
,c,r
        check_command                  check_esx_host_vmfs
!90!98
      

Warning message is 90% and Critical is 98%, but right now its 61% but shows a warning on Nagios UI.

Is i am define something wrong here to setup this plugin or this is a bug in this.
Attached Thumbnails
Click image for larger version

Name:	esxi_datastore.PNG
Views:	25
Size:	2.6 KB
ID:	12005  

Last edited by sunnysthakur; 03-05-2013 at 02:32 AM.
 
Old 03-05-2013, 06:50 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
run the actual command directly from teh command line and check what that says. Nagios is a very dumb system, and is just returning a string back from a program it's run.

You have used AREG2 and ARG3 when it should be ARG1 and ARG2, but that wouldn't change the output I don't think.
 
Old 03-05-2013, 11:34 PM   #3
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Original Poster
Rep: Reputation: Disabled
Hello,

When i am running this plugin's command on bash below output is displayed.

PHP Code:
[root@monitor ~]# /usr/lib64/nagios/plugins/check_esx3 -H 104.10.04.218 -u admin -p password1234 -l vmfs -w 90 -c 95
[B]CHECK_ESX3 CRITICAL Storages datastore1=584293.00 MB (61.59%) | datastore1=584293.00MB;90;95[/B
This shows the CRITICAL with same command nagios is executing from command.cfg
 
Old 03-06-2013, 01:33 AM   #4
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Original Poster
Rep: Reputation: Disabled
Hello,

After googling for this issue and found that the check_esx3 script is throwing WARNING and CRITICAL status if we use %age for datastore [w 90% and c 95%].
This works fine if we set triggers in MBs [Total size/trigger%][ -w 853862 -c 901299]

PHP Code:
/usr/lib64/nagios/plugins/c;901H 104.10.50.218 -u admin -p password1234 -l vmfs -o used -w 853862 -c 901299
CHECK_ESX3 OK 
Storages datastore1=364443 MB (38.41%) | datastore1=364443MB;853862;901299[/code
PHP Code:
# /usr/lib64/nagios/plugins/check_esx3 -H 104.10.50.218 -u admin -p password1234 -l vmfs -o used
CHECK_ESX3 OK Storages datastore1=364443 MB (38.41%) | datastore1=364443MB;; 

To set the trigger we have to define the -w and -c as per the disk capacity on each esx hosts.

Detail is given on this link
[URL="http://exchange.nagios.org/directory/Plugins/Operating-Systems/*-Virtual-Environments/VMWare/Vmware-ESX-%26-VM-host/details"]

Better to fix this script to use %age instead of MBs

Last edited by sunnysthakur; 03-06-2013 at 01:36 AM.
 
Old 03-06-2013, 02:29 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
right, so you can update that yourself, right? All cleared up?
 
Old 03-06-2013, 03:11 AM   #6
sunnysthakur
Member
 
Registered: Aug 2012
Posts: 92

Original Poster
Rep: Reputation: Disabled
Yeah chris...

All cleared and fixed.
 
  


Reply

Tags
esxi, nagios



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Upgrade/Migrate VMware ESX/ESXi 4.x To ESXi 5.0 LXer Syndicated Linux News 0 09-11-2011 03:10 PM
LXer: Monitoring ESX/ESXi Servers LXer Syndicated Linux News 0 08-01-2011 06:10 AM
[SOLVED] Vim Plugin Issue changowero Linux - Software 6 05-04-2011 02:17 PM
RAID card for vmware esxi, and some other esxi questions JustinHoMi Linux - Enterprise 1 06-04-2010 03:57 PM
nagios plugin for monitoring the no. of open files for a particular process sarathveera Linux - Software 1 02-05-2010 12:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration