Code Monkey home page Code Monkey logo

centreon-vmware's Introduction

centreon-vmware

"centreon-vmware" is a free and open source project. The project can be used with Centreon and all monitoring softwares compatible with Nagios plugins. It's a Perl daemon in charged to get back VMWare indicators. This program uses the SDK Perl provided by VMWare.

The connector could get following indicators:

  • For ESX Server:
    • Current alarms
    • CPU usage
    • Memory usage
    • Swap usage
    • Interface trafics
    • Count VMs
    • Health status
    • Global status
    • Uptime
  • For Virtual Machines:
    • CPU usage
    • Memory usage
    • Swap usage
    • IOPs on datastores
    • Limits configured (CPU, memory and disks)
    • Snapshot age and consolidation
    • Thinprovisioning configuration
    • VMTools state
  • For Datastores:
    • Usage
    • IOPs
    • Usage in bytes/s
    • Snapshost sizes
  • For Cluster:
    • Operations on virtual machines (Clone, VMotion,...)
  • For Datacenter:
    • Current alarms

You can check one or X entities for each checks. Moreover, you can also "scope" it. It means: i can check the virtual machines of a datacenter(s) and/or a cluster(s).

Please follow the documentation for the installation: https://github.com/centreon/centreon-vmware/blob/master/doc/en/installation/index.rst

Examples

Check vmtools states of virtual machines (with name matching the regexp 'prd'):

$ perl centreon_plugins.pl --plugin=apps::vmware::connector::plugin --connector-hostname=127.0.0.1 --container=default --verbose --mode=tools-vm --display-description --vm-hostname='prd' --filter
WARNING: 1 VM with VMTools not installed |
vmtools not installed:
    prd-Reporting - 10.0.0.1 [description xxxx]

Check datastore IOPs of virtual machines (with name matching the regexp 'centreon-central-1|Formation'):

$ perl centreon_plugins.pl --plugin=apps::vmware::connector::plugin --connector-hostname=127.0.0.1 --container=default --verbose --mode=datastore-vm --vm-hostname='woot|test-migration' --filter
OK: All virtual machines are ok | 'max_total_latency_test-migration'=2.00ms;;;0; 'riops_test-migration_INTEGRATION'=0.41iops;;;0; 'wiops_test-migration_INTEGRATION'=4.84iops;;;0;4.84 'riops_test-migration_ISOs'=0.00iops;;;0; 'wiops_test-migration_ISOs'=0.00iops;;;0;0.00 'max_total_latency_woot'=23.00ms;;;0; 'riops_woot'=0.02iops;;;0; 'wiops_woot'=0.67iops;;;0;0.67
checking virtual machine 'test-migration'
    [connection state connected][power state poweredOn]
    max total latency is 2.00 ms
    datastore 'INTEGRATION' 0.41 read iops, 4.84 write iops
    datastore 'ISOs' 0.00 read iops, 0.00 write iops
checking virtual machine 'woot'
    [connection state connected][power state poweredOn]
    max total latency is 23.00 ms
    datastore 'DSI' 0.02 read iops, 0.67 write iops

Check the health of ESX Servers:

$ perl centreon_plugins.pl --plugin=apps::vmware::connector::plugin --connector-hostname=127.0.0.1 --container=default --verbose --mode=health-host --esx-hostname='.*' --filter --disconnect-status='ok'
OK: 0 total health issue(s) found - All ESX hosts are ok | 'total_problems'=0;;;0;1034 'problems_srvi-clus-esx-n1.int.centreon.com'=0;;;0;315 'problems_yellow_srvi-clus-esx-n1.int.centreon.com'=0;;;0;315 'problems_red_srvi-clus-esx-n1.int.centreon.com'=0;;;0;315 'problems_srvi-clus-esx-n2.int.centreon.com'=0;;;0;315 'problems_yellow_srvi-clus-esx-n2.int.centreon.com'=0;;;0;315 'problems_red_srvi-clus-esx-n2.int.centreon.com'=0;;;0;315 'problems_srvi-clus-esx-n3.int.centreon.com'=0;;;0;202 'problems_yellow_srvi-clus-esx-n3.int.centreon.com'=0;;;0;202 'problems_red_srvi-clus-esx-n3.int.centreon.com'=0;;;0;202 'problems_srvi-clus-esx-n4.int.centreon.com'=0;;;0;202 'problems_yellow_srvi-clus-esx-n4.int.centreon.com'=0;;;0;202 'problems_red_srvi-clus-esx-n4.int.centreon.com'=0;;;0;202
checking host 'srvi-clus-esx-n1.int.centreon.com'
    status connected
    315 health checks are green, 0 total health issue(s) found, 0 yellow health issue(s) found, 0 red health issue(s) found
checking host 'srvi-clus-esx-n2.int.centreon.com'
    status connected
    315 health checks are green, 0 total health issue(s) found, 0 yellow health issue(s) found, 0 red health issue(s) found
checking host 'srvi-clus-esx-n3.int.centreon.com'
    status connected
    202 health checks are green, 0 total health issue(s) found, 0 yellow health issue(s) found, 0 red health issue(s) found
checking host 'srvi-clus-esx-n4.int.centreon.com'
    status connected
    202 health checks are green, 0 total health issue(s) found, 0 yellow health issue(s) found, 0 red health issue(s) found

centreon-vmware's People

Contributors

cgagnaire avatar garnier-quentin avatar hecko avatar julienmathis avatar kduret avatar lgcosta avatar lpinsivy avatar maxcentreon avatar pkriko avatar qdelance avatar querwin avatar sbraz avatar sc979 avatar sims24 avatar thekoma avatar zguennoune02 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

Watchers

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

centreon-vmware's Issues

Startup script doesn't work

Hi,

In Debian Jessie 8.4, startup script didn't work.

When I start it manually, it only work on /usr/lib/nagios/plugins, if not, I have this error:

 /usr/bin/centreon_vmware.pl
 Possible precedence issue with control flow operator at /usr/local/share/perl/5.20.2/VMware/VICommon.pm line 2147.
 Can't locate centreon/plugins/options.pm in @INC (you may need to install the centreon::plugins::options module) (@INC contains: /usr/bin /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl5/centreon/vmware/common.pm line 28.
 BEGIN failed--compilation aborted at /usr/share/perl5/centreon/vmware/common.pm line 28.
 Compilation failed in require at /usr/share/perl5/centreon/script/centreon_vmware.pm line 33.
 BEGIN failed--compilation aborted at /usr/share/perl5/centreon/script/centreon_vmware.pm line 33.
 Compilation failed in require at /usr/bin/centreon_vmware.pl line 23.
 BEGIN failed--compilation aborted at /usr/bin/centreon_vmware.pl line 23.

Any idea?

Regards,

[apps::vmware::connector::plugin] --filter help

Hi, as asked (here : centreon/centreon-plugins#292) I open this issue here :)

I'm looking for help to use the filter with the vmware connector plugin.
I want to be able to check tools status on all my vms that are monitored by my Centreon, but the thing is sometimes centreon hostname for a vm is not exactly the same it is on Vmware (Upper/lower case is the most common issue)

So i was looking to make the check not case dependent.

I'll use '$hostname$' variable from centreon, but if my vm is, for exemple Cyan1 in vmware and cyan1 in centreon, it won't work :

/centreon_plugins.pl --plugin=apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --container=default --verbose --mode=tools-vm ---filter --vm-hostname='Cyan1'
WARNING: 1 VM with VMTools not up-to-date |
vmtools not up-to-date:
Cyan1

./centreon_plugins.pl --plugin=apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --container=default --verbose --mode=tools-vm ---filter --vm-hostname='cyan1'
UNKNOWN: Cannot find 'VirtualMachine' object |

what should I put in addition to $hostname$ in the vm-hostname regex to be able to check that ?

I tried --vm-hostname='/$hostname$/i' but it didn't work and my regex knowledge stop there :(

Add user and size of snapshot

Hi, is it possible to add in the apps::vmware::connector::plugin and mode snapshot-vm the name of theguy who made the snapshot and the size of each snapshot ?

Thanks in advance!

time-host - threshold not working

Hello,

When setting warning and critical time, it's always getting warning and error state

Sample: generate alert while less than a second time shift:

# /usr/lib/nagios/plugins/centreon-plugins/centreon_plugins.pl --plugin=apps::vmware::connector::plugin  --custommode=connector --connector-hostname=127.0.0.1 --verbose --mode time-host --scope-datacenter "MYdatacenter01" --warning-time 60 --critical-time 90
CRITICAL: 'esxi01.mydomain.com' Time offset 0 second(s) : 2017-11-18T14:05:28.044914Z | 'offset'=-0.0449140071868896s;0:60;0:90;0;
'esxi01.mydomain.com' date: 2017-11-18T14:05:28.044914Z, offset: -0.0449140071868896 second(s)

-0.0449140071868896 second is below both threshold of 60 an 90

Mode 'alarm-*' error

There is a bug with 'alarm-*' modes:
UNKNOWN: VMWare error (verbose mode for more details) | 'alarm_warning'=0;;;0; 'alarm_critical'=0;;;0;
Can't call method "type" on an undefined value at /usr/local/share/perl5/VMware/VICommon.pm line 1501.

Add the posibility to monitor the storagehealth and temperature.

Hi Quentin,
It would be very great if you can add an option to monitor the storagehealth of datastores (I would like to be alerted when a raid become degraded) and temperature of ESXis hosts.

check_vmware_api from consol.de have this possibility.

Could you add it to centreon_vmware ?

Thanks you very much in advance and merry christmas!

Uninitialized value in memory-host mode

Following errors in logs:

Use of uninitialized value within %mapping_state in sprintf at /root/centreon-vmware-master/centreon/vmware/cmdmemhost.pm line 156

apps::vmware::connector::plugin - mode memory-vm

Hello,

I'm using Centreon vmware plugin to monitor VM memory usage. The plugin works well, here is an output example:

OK: Memory Total: 16.00 GB Used: 15.93 GB (99.54%) Free: 75.93 MB (0.46%) | 'used'=17100247040B;;;0;17179869184 'overhead'=98094080B;;;0; 'ballooning'=0B;;;0; 'active'=3596315648B;;;0; 'shared'=79767552B;;;0;

However I would like to trigger alert regarding active memory instead of used memory (most relevant). Active memory is shown in perfdata counters.

Is there a way to trigger alerting on active memory instead of used memory?

Cannot get value for counters

Hi,
Following the doc (https://documentation-fr.centreon.com/docs/centreon-vmware/fr/latest/exploitation/index.html#troubleshooting ) I synchronized every servers ( vcenter, esx, centreon... ) with the same ntp server. So I shouldn’t have any trouble ?
The fact is that i always have some " cannot get value for counter" errors. Sometimes, the PerfQuery invocation return null values. I don't know exactly why ? Are you sure it's a safe method ?
The problem is that centreon return code changes from OK to UNKNOWN and i lost metrics.
In common.pm, i was wondering why you don't use the maxSample arg but only startTime and endTime ?
If I modify your code in common.pm ( very dirty , i know ), referring to the sdk doc :

PerfQuerySpec->new(entity => $entry->{entity},
metricId => $perf_metric_ids,
format => 'normal',
intervalId => 20,
maxSample => 15
#startTime => $startTime,
#endTime => $endTime

);

I get no more the "Cannot get value for counters" errors and get realtime metrics : no ?

list-esxhost to use with centreon-auto-discovery-server

Hello Quentin,

Is it possible to add a new mode to discover Esx Host managed by a vCenter with centreon-auto-discovery-server ?

It would create any new ESX host following a host template and optionaly modify /etc/centreon/centreon_vmware.pm for direct controls.
It would disable any ESX host which have been deleted from vCenter.

Thanks.

Cannot get response

Hello,

When i launch the following command :

perl centreon_plugins.pl --plugin=apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --container=default --verbose --mode=health-host --esx-hostname='.*' --filter --disconnect-status='ok'

i get this error : UNKNOWN: Cannot get response (timeout received)

Can you help me ?

Problems with update.

Hello,

A "yum update" command give this result :'(.

Erreur : Paquet : ces-plugins-Virtualization-VMWare-daemon-2.3.1-1.el6.noarch (@ces-standard-stable-noarch)
             Requiert : perl(ZMQ::LibZMQ3)
             Suppression : perl-ZMQ-LibZMQ3-1.19-1.el6.x86_64 (@ces-standard-stable)
                 perl(ZMQ::LibZMQ3)
             Rendu obsolète par : perl-ZMQ-LibZMQ4-0.01-1.el6.x86_64 (ces-standard-stable-deps)
                 Non trouvé
Erreur : Paquet : ces-plugins-Virtualization-VMWare-client-2.3.1-1.el6.noarch (@ces-standard-stable-noarch)
             Requiert : perl(ZMQ::LibZMQ3)
             Suppression : perl-ZMQ-LibZMQ3-1.19-1.el6.x86_64 (@ces-standard-stable)
                 perl(ZMQ::LibZMQ3)
             Rendu obsolète par : perl-ZMQ-LibZMQ4-0.01-1.el6.x86_64 (ces-standard-stable-deps)
                 Non trouvé

[CES Poller] centreon-vmware Installation with rpm

Hello

I'm using a new Centreon Poller and when I try to install the connector:

yum install ces-plugins-Virtualization-VMWare-daemon

and the client:

yum install ces-plugins-Virtualization-VMWare-client

I get the following error :

No package ces-plugins-Virtualization-VMWare-daemon available.

and

No package ces-plugins-Virtualization-VMWare-client available.

I have installed already perl-VMware-vSphere successfully

Anything I have missed ??

Sulian

datastore-usage provisioned value is over 100%

/usr/lib/nagios/plugins/centreon_plugins.pl --plugin=apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1" --mode=datastore-usage --datastore-name='StorageApplianceX_VMFS-NN.' --warning 80 --critical 90 --warning-provisioned 80 --critical-provisioned 90

alerts:
Date/Time: 2016-11-29 Additional Info : CRITICAL: Datastore StorageApplianceX_VMFS-NN. Total: 682.75 GB Used: 371.67 GB (54.44%) Free: 311.08 GB (45.56%) Provisioned: 971.66 GB (142.32%)

Provisioned is over 100% as per below table (5 minute interval measurements), then reverts to a value of 645277000000 for all others (and used value 399041000000):

humantime	provisioned	used
2016-11-28 05:03:33	1043340000000	399099000000
2016-11-28 05:08:33	1043340000000	399099000000
2016-11-28 05:13:33	1043340000000	399099000000
2016-11-28 05:18:33	1043340000000	399099000000
2016-11-28 05:23:33	1043340000000	399099000000
2016-11-28 05:28:33	1043460000000	399217000000
2016-11-28 05:33:33	1043460000000	399217000000
2016-11-28 05:38:33	1043460000000	399217000000
2016-11-28 05:43:33	1043460000000	399217000000
2016-11-28 05:48:33	1043460000000	399217000000
2016-11-28 05:53:33	1043460000000	399217000000

2016-11-29 05:05:42	1043310000000	399082000000
2016-11-29 05:10:42	1043310000000	399082000000
2016-11-29 05:15:42	1043310000000	399082000000
2016-11-29 05:20:42	1043310000000	399082000000
2016-11-29 05:25:42	1043310000000	399082000000
2016-11-29 05:30:42	1043430000000	399200000000
2016-11-29 05:35:42	1043430000000	399200000000
2016-11-29 05:40:42	1043430000000	399200000000
2016-11-29 05:45:42	1043430000000	399200000000
2016-11-29 05:50:42	1043430000000	399200000000
2016-11-29 05:55:42	1043430000000	399200000000

The datastores contain thin provisioned VMware VM disks and at 05:00 a Veeam reverse incremental backup takes place, with 3 VMs ("VM size: 1.4 TB (684.2 GB used)"). Right before the end of the job (05:36) a two week old .vrb is removed, not sure why the provisioned check keeps returning higher values for 4 more checks.

Is the plugin buggy, our setup broken or is this normal behaviour with thin provisioned disks and should I just forget about using warning-provisioned and critical-provisioned for monitoring?

datastore-iops

Hello,

Concerning the new constraint of "counter level: 3, sampling level: 2" for the datastore-iops mode :

VMWare says :
"VMware strongly recommends you to not run at higher statistical collection levels for prolonged periods of time".
Source : http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2003885

My customer's experts does not want to increase counter level.

Why did you add this new constraint ? The previous mode was not relevant ?
If it was, would it be possible to keep both ?

Thanks.

apps::vmware::connector::plugin, the option "--unit" doesn't work

Hello,
After installing centreon-plugins-base-1.15 on my centreon 2.7.1, the option "--unit" doesn't work anymore for the plugin apps::vmware::connector::plugin. The following message appears:
"Unknown option: unit at /usr/lib/nagios/plugins/centreon-lugins/centreon/plugins/alternative/Getopt.pm line 66". (even if we use '%' or 'B').

Regards,

apps::vmware::connector::plugin - mode memory-vm

Hello,

I've got a problem with the apps::vmware::connector::plugin plugin.

Works well when i want to get the CPU VM info :

./centreon_plugins.pl --plugin=apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --verbose --mode=cpu-vm --vm-hostname cbh14
OK: 'cbh14' Total Average CPU usage 8.50 %, Total Average CPU 1765.00 Mhz, CPU ready 4.03 % on last 5 min | 'cpu_total'=8.50%;;;0;100 'cpu_total_MHz'=1765.00MHz;;;0; 'cpu_ready'=4.03%;;;0; 'cpu_0_MHz'=231.00MHz;;;0; 'cpu_1_MHz'=287.00MHz;;;0; 'cpu_2_MHz'=206.00MHz;;;0; 'cpu_3_MHz'=210.00MHz;;;0; 'cpu_4_MHz'=184.00MHz;;;0; 'cpu_5_MHz'=198.00MHz;;;0; 'cpu_6_MHz'=189.00MHz;;;0; 'cpu_7_MHz'=197.00MHz;;;0;

But not with the memory info :

./centreon_plugins.pl --plugin=apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --verbose --mode=memory-vm --vm-hostname cbh14 --sampling-period 300 --debug
UNKNOWN: Cannot get counter 'mem.active.average' for the sampling period '300' (counter level: 2, sampling level: 1) |

Any clue ?

Regards,

[2.3.0] - unable to configure more containers

Hi,

I'm not able to configure more then one container in centreon_vmware.pm. With one container the daemon will start, with more then one the daemon failed to start.

Working syntax:

%centreon_vmware_config = (
        vsphere_server => {
                        'GEOS' => {'url' => 'https://xxx.xxx.xxx.xxx/sdk',
                                     'username' => 'user',
                                     'password' => 'pwd'},
                        }
);

Not working syntax:

%centreon_vmware_config = (
        vsphere_server => {
                        'GEOS' => {'url' => 'https://xxx.xxx.xxx.xxx/sdk',
                                     'username' => 'user',
                                     'password' => 'pwd'},
                        },
                        'TEXEL' => {'url' => 'https://xxx.xxx.xxx.xxx/sdk',
                                     'username' => 'user',
                                     'password' => 'pwd'},
                        }
);

Check datastore-vm doesn't work with VMware Virtual SAN.

Hello,

While checking datastore-vm on Virtual Machine using a Virtual SAN. The plugin returns "UNKNOWN: Cannot get value for counters (Maybe, object(s) cannot be reached: disconnected, not running,...) |"

Best regards and sorry for my bad english.

--mode=status-vm : global status isn't the Power status?

Hi,
I would like to monitor a Cluster with xx VM and see if one is poweredoff, and also have it's name.
I thought that --mode=status-vm could do this, but when i use it, it tell me that all VM are OK.
Actually, on a specific Cluster i got 22VM and for now, only 7 are poweredON, but the plugin return OK.

Is it normal or do i miss something?

filter with mode tools-vm

Hello,

I use tools vm mode, but i have issues with the filter.

All my server name starts with "SRV" so i can filter with that, but i need to exclude all servers with name finish by "replica"

Is it possible ?

tanks

Plugin error for mode:alarm-host

Hello team,

I use the vmware connector for approx 20 hosts, and it works fine. For one host, there are 2 alarms with issue (other checks are ok).
cap 2016-01-03 a 11 17 02
If I test in command line with verbose:
UNKNOWN: VMWare error (verbose mode for more details) | 'alarm_warning'=0;;;0; 'alarm_critical'=0;;;0;
Can't call method "type" on an undefined value at /usr/local/share/perl5/VMware/VICommon.pm line 1501.
Checking host xxxx.example.com
0 warn alarm(s) found(s) - 0 critical alarm(s) found(s)

The same check works on other hosts, so, it couldn't be a Perl package issue, no?

how filter vm in check vm-tools?

Bonjour / hello

Je voudrais exclure quelques VM de la sonde VMware vm-tools, mais je n'y arrive pas.
Voici la command de base :
/usr/lib/centreon/plugins/centreon_vmware_connector_client.pl --plugin=apps::vmware::connector::plugin --mode=tools-vm --custommode=connector --connector-hostname='localhost' --connector-port='5700' --container='******' --vm-hostname='.' --filter --tools-notinstalled-status='critical' --tools-notrunning-status='critical' --tools-notup2date-status='warning' --disconnect-status='ok' --nopoweredon-skip --verbose

qui me renvoie 6 VM not up-to-date, 4 vmtools not running et 3 vmtools not installed.

Je voudrais ôter du check 2 ou 3 VM qui sont des appliance que je ne peux pas modifier. comment faire j'ai essayé ca et ca ne fonctionne pas :
/usr/lib/centreon/plugins/centreon_vmware_connector_client.pl --plugin=apps::vmware::connector::plugin --mode=tools-vm --custommode=connector --connector-hostname='localhost' --connector-port='5700' --container='******' --vm-hostname='.' --filter --tools-notinstalled-status='critical' --tools-notrunning-status='critical' --tools-notup2date-status='warning' --disconnect-status='ok' --nopoweredon-skip --verbose --filter='vm_a_exclure'

Merci d'avance pour l'aide apportée.

Gaby

####################################
I would like to exclude some VM VMware vm-tools probe, but I can't.
Here is the basic command:
/usr/lib/centreon/plugins/centreon_vmware_connector_client.pl --plugin=apps::vmware::connector::plugin --mode=tools-vm --custommode=connector --connector-hostname='localhost' --connector-port='5700' --container='******' --vm-hostname='.' --filter --tools-notinstalled-status='critical' --tools-notrunning-status='critical' --tools-notup2date-status='warning' --disconnect-status='ok' --nopoweredon-skip --verbose

The result is 6 VM not up-to-date, 4 vmtools not running et 3 vmtools not installed.

I would like to remove the check 2 or 3 VM that are appliance that I can't change. How do I tried that and it does not work:
/usr/lib/centreon/plugins/centreon_vmware_connector_client.pl --plugin=apps::vmware::connector::plugin --mode=tools-vm --custommode=connector --connector-hostname='localhost' --connector-port='5700' --container='******' --vm-hostname='.' --filter --tools-notinstalled-status='critical' --tools-notrunning-status='critical' --tools-notup2date-status='warning' --disconnect-status='ok' --nopoweredon-skip --verbose --filter='vm_a_exclure'

Thanks

Gaby

[2.3.0] - unable to check memory/network ESX host

###Packages
ces-plugins-Virtualization-VMWare-client-2.3.0-1.el6.noarch
ces-plugins-Virtualization-VMWare-daemon-2.3.0-1.el6.noarch

Hi.

I'm not able to configure checks of memory and Network traffic of ESX. However, others check run ok:

[]# /etc/centreon-scripts/centreon-plugins/centreon_plugins.pl --plugin apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --container=ESXi5 --mode time-host --esx-hostname
OK: '' Time offset 0 second(s) : 2016-11-03T13:06:17.999873Z | 'offset'=-0.999872922897339s;;;0;

[]# /etc/centreon-scripts/centreon-plugins/centreon_plugins.pl --plugin apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --container=ESXi5 --mode net-host --esx-hostname --sampling-period 20
UNKNOWN: Cannot get value for counters (Maybe, object(s) cannot be reached: disconnected, not running, time not synced (see time-host mode),...) |

[]# /etc/centreon-scripts//centreon-plugins/centreon_plugins.pl --plugin apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --container=ESXi5 --mode net-host --esx-hostname
UNKNOWN: Cannot get counter 'net.received.average' for the sampling period '300' (counter level: 2, sampling level: 1) |

[]#/etc/centreon-scripts/centreon-plugins/centreon_plugins.pl --plugin apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --container=ESXi5 --mode cpu-host --esx-hostname
OK: '' Total Average CPU usage '55.66%' on last 5 min | 'cpu_total'=55.66%;;;0;100 'cpu_total_MHz'=10687.00MHz;;;0;19200 'cpu0'=30.76%;;;0;100 'cpu1'=28.08%;;;0;100 'cpu2'=32.07%;;;0;100 'cpu3'=27.41%;;;0;100 'cpu4'=29.13%;;;0;100 'cpu5'=31.26%;;;0;100 'cpu6'=29.62%;;;0;100 'cpu7'=31.21%;;;0;100 'cpu8'=26.92%;;;0;100 'cpu9'=24.57%;;;0;100 'cpu10'=26.61%;;;0;100 'cpu11'=24.74%;;;0;100 'cpu12'=26.43%;;;0;100 'cpu13'=24.81%;;;0;100 'cpu14'=26.60%;;;0;100 'cpu15'=24.96%;;;0;100

On the other hand, With another plugins... there aren't Issues:
[]# ./check_vmware_api -D -u -p -H -l mem -s usage
CHECK_VMWARE_API OK - mem usage=83.83 % | mem_usage=83.83%;;

LibZMQ4 and Centreon 3.4

Hi,

The new version didn't work on Centreon 3.4 (based on CentOS 6.7). We have the following error message. Someone already find a solution? Thanks in advanced

Can't locate ZMQ/LibZMQ4.pm in @inc (@inc contains: /usr/lib/nagios/plugins/centreon-plugins /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/lib/nagios/plugins/centreon-plugins/apps/vmware/connector/custom/connector.pm line 26.
BEGIN failed--compilation aborted at /usr/lib/nagios/plugins/centreon-plugins/apps/vmware/connector/custom/connector.pm line 26.
Compilation failed in require at /usr/lib/nagios/plugins/centreon-plugins/centreon/plugins/misc.pm line 221

-plugin=apps::vmware::connector::plugin and UNKNOWN: Container connection problem

Hello

I have 2 servers normally identical.
I have installed on the 2 servers
ces-plugins-Virtualization-VMWare-client-2.3.1-1.el6.noarch.rpm
ces-plugins-Virtualization-VMWare-daemon-2.3.1-1.el6.noarch.rpm

I have the same /etc/centreon/centreon_vmware.pm
%centreon_vmware_config = (
vsphere_server => {
'ale' => {'url' => 'https://x.y.z.t/sdk',
'username' => 'monitoring',
'password' => 'xxxxxx'}
}

);

1;

When I do the test on the 1rst server
usr/bin/perl /usr/bin/centreon_vmware.pl --config=/etc/centreon/centreon_vmware.pm
2017-10-18 16:54:44 - Create vsphere sub-process for 'ale'
2017-10-18 16:54:44 - [Server accepting clients]
2017-10-18 16:54:44 - 'ale' init begin
2017-10-18 16:54:44 - 'ale' init done
2017-10-18 16:54:44 - 'ale' Vsphere connection in progress
2017-10-18 16:54:44 - 'ale' Vsphere connection ok
2017-10-18 16:54:44 - 'ale' Create perf counters cache in progress
2017-10-18 16:54:45 - 'ale' Create perf counters cache done

It seems OK

On the second server I have
/usr/bin/perl /usr/bin/centreon_vmware.pl --config=/etc/centreon/centreon_vmware.pm
2017-10-18 16:54:26 - Create vsphere sub-process for 'ale'
2017-10-18 16:54:26 - [Server accepting clients]
2017-10-18 16:54:26 - 'ale' init begin
2017-10-18 16:54:26 - 'ale' init done
2017-10-18 16:54:26 - 'ale' Vsphere connection in progress
2017-10-18 16:54:26 - 'ale' Login to VirtualCenter server failed: Server version unavailable at 'https://10.67.129.100:443/sdk/vimService.wsdl' at /usr/local/share/perl5/VMware/VICommon.pm line 545.

2017-10-18 16:54:36 - 'ale' Vsphere connection in progress
2017-10-18 16:54:36 - 'ale' Login to VirtualCenter server failed: Server version unavailable at 'https://10.67.129.100:443/sdk/vimService.wsdl' at /usr/local/share/perl5/VMware/VICommon.pm line 545.

But I see nothing going out of the server wit a tcpdump
tcpdump -i eth0 host x.y.z.t
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
.....

In the log there are these lines

2017-10-18 17:02:06 - 'ale' Login to VirtualCenter server failed: Server version unavailable at 'https://x.y.z.t:443/sdk/vimService.wsdl' at /usr/local/share/perl5/VMware/VICommon.pm line 545.

2017-10-18 17:02:16 - 'ale' Login to VirtualCenter server failed: Server version unavailable at 'https://x.y.z.t:443/sdk/vimService.wsdl' at /usr/local/share/perl5/VMware/VICommon.pm line 545.

2017-10-18 17:02:26 - 'ale' Login to VirtualCenter server failed: Server version unavailable at 'https://x.y.z.t:443/sdk/vimService.wsdl' at /usr/local/share/perl5/VMware/VICommon.pm line 545.

2017-10-18 17:02:36 - 'ale' Login to VirtualCenter server failed: Server version unavailable at 'https://x.y.z.t:443/sdk/vimService.wsdl' at /usr/local/share/perl5/VMware/VICommon.pm line 545.

2017-10-18 17:02:46 - 'ale' Login to VirtualCenter server failed: Server version unavailable at 'https://x.y.z.t:443/sdk/vimService.wsdl' at /usr/local/share/perl5/VMware/VICommon.pm line 545.

and when I use the online command

/usr/lib/nagios/plugins/centreon_plugins.pl --plugin=apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --container=ale --mode=memory-host --warning=85 --critical=95
UNKNOWN: Container connection problem |

Have you an Idea, I have personally no idea !

VMware object not displaying with alarm-datacenter mode

On the long output from the alarm-datacenter mode, the VMware's object are not displayed, only the type :
[yellow] [Utilisation de la banque de données sur disque] [2015-11-09T13:32:01.012999Z] [Datastore] Alarme par défaut pour contrôler l'utilisation du disque de la banque de données
[yellow] [Utilisation de la banque de données sur disque] [2015-11-30T14:00:54.930435Z] [Datastore] Alarme par défaut pour contrôler l'utilisation du disque de la banque de données
[yellow] [état Consolidation de machine virtuelle nécessaire] [2015-12-23T15:48:28.654943Z] [VirtualMachine] Alarme par défaut déclenchée lorsque l'état Consolidation de machine virtuelle nécessaire est défini

Error on Alarm-host for one ESX

Here the command and error message:
The plugin got the last version :-)

/usr/lib/nagios/plugins/centreon_plugins.pl --plugin=apps::vmware::connector::plugin --mode=alarm-host --custommode=connector --connector-hostname=127.0.0.1 --container=xxxx --verbose
UNKNOWN: VMWare error (verbose mode for more details) | 'alarm_warning'=0;;;0; 'alarm_critical'=0;;;0;
Can't call method "type" on an undefined value at /usr/local/share/perl5/VMware/VICommon.pm line 1501.
Checking host xxx.yyy.com
0 warn alarm(s) found(s) - 0 critical alarm(s) found(s)

Thanks in advance.

tools-vm wrong tools-notinstalled status output and option "tools-notinstalled-status" is not taken into account

Hi,

I notice a wrong output for notinstalled-status. In fact, whereas it should be 'critical' by default, 'warning' status is returned :

#> ./centreon_plugins.pl --plugin=apps::vmware::connector::plugin --mode=tools-vm --custommode=connector --connector-hostname=127.0.0.1 --container='mycontainer' --vm-hostname='myvm' --filter --nopoweredon-skip
WARNING: 1 VM with VMTools not installed |

Then if I try to foce output with the "tools-notinstalled-status" option, I still get a 'warning' status :

#> ./centreon_plugins.pl --plugin=apps::vmware::connector::plugin --mode=tools-vm --custommode=connector --connector-hostname=127.0.0.1 --container='mycontainer' --vm-hostname='myvm' --filter --nopoweredon-skip --tools-notinstalled-status='critical'
WARNING: 1 VM with VMTools not installed |

Strange behaviour. If I set "tools-notup2date-status" option to critical, it affects the "notinstalled-status" output :

#> ./centreon_plugins.pl --plugin=apps::vmware::connector::plugin --mode=tools-vm --custommode=connector --connector-hostname=127.0.0.1 --container='mycontainer' --vm-hostname='myvm' --filter --nopoweredon-skip --tools-notup2date-status='critical'
CRITICAL: 1 VM with VMTools not installed |

Any advice?

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.