Debian Codegraph @

connectors/vmware/doc/en/exploitation/index.rst

raw
1 ============
2 Exploitation
3 ============
4
5 Generals Principles
6 -------------------
7
8 Centreon-vmware is a Perl program in charged to get back VMWare indicators. This program uses the SDK Perl provided by VMWare in order to connect and get back the informations of one (or more) Virtual Center. To do this, it makes a TCP connection with the VirtualCenter.
9
10 By default "centreon-vmware" starts at least two processes (named "handle-client" and "handle-vsphere-xxxx") :
11
12 *« handle-client »*:
13 *Process waiting for requests of clients.*
14
15 Steps of operation :
16
17 - A client connects.
18 - The client ask an monitoring indicator on a VirtualCenter.
19 - The process "handle-client" sends the request to process "handle-vsphere-xxxx".
20 - A response is sent by "handle-vsphere-xxxx" to "handle-client".
21 - The process "handle-client" sends the response to the client.
22
23 *« handle-vsphere-xxxx »*:
24 *Process responsible to connect and to keep opened a session with the VirtualCenter. To ensure quality performance, a cache of datas description is created.*
25
26 Then, this process gets back the VMWare indicators creating a subprocess per request.
27
28 Centreon-vmware necessitates the utilization of one (or more) VirtualCenter (or ESX).
29 This is a example of a distributed architecture :
30
31 .. image:: ../images/archi.png
32
33 Operating mode
34 --------------
35
36 The "centreon-vmware" program only works in "daemon" mode (a client is needed).
37
38 Connector configuration
39 -----------------------
40
41 The « centreon-vmware » daemon is configured with the « centreon_vmware.pm » configuration file:
42 ::
43
44 %centreon_vmware_config = (
45 vsphere_server => {
46 'default' => {'url' => 'https://vcenter/sdk',
47 'username' => '[email protected]',
48 'password' => 'xxxx'},
49 }
50 );
51
52 « vsphere_server » attribute configures VirtualCenter access.
53 In case you have many VirtualCenters, the configuration is (note the use of "," as a separator):
54 ::
55
56 %centreon_vmware_config = (
57 vsphere_server => {
58 'default' => {'url' => 'https://vcenter/sdk',
59 'username' => '[email protected]',
60 'password' => 'xxxx'},
61 'other' => {'url' => 'https://other_vcenter/sdk',
62 'username' => '[email protected]',
63 'password' => 'xxxx'},
64 },
65 );
66
67 'other' and 'default' are containers name.
68
69 Client Usage
70 ------------
71
72 Check vmtools states of virtual machines (with name matching the regexp 'prd'):
73 ::
74
75 $ perl centreon_plugins.pl --plugin=apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --container=default --verbose --mode=tools-vm --display-description --vm-hostname='prd' --filter
76 WARNING: 1 VM with VMTools not installed |
77 vmtools not installed:
78 prd-Reporting - 10.0.0.1 [description xxxx]
79
80 Check datastore IOPs of virtual machines (with name matching the regexp 'centreon-central-1|Formation'):
81 ::
82
83 $ perl centreon_plugins.pl --plugin=apps::vmware::connector::plugin --custommode=connector --connector-hostname=127.0.0.1 --container=default --verbose --mode=datastore-vm --vm-hostname='centreon-central-1|Formation' --filter
84 OK: All Datastore IOPS counters are ok | 'riops_Formation-Reporting - 10.30.2.89_R&D-BI'=0.00iops;;;0; 'wiops_Formation-Reporting - 10.30.2.89_R&D-BI'=1.43iops;;;0; 'riops_centreon-central-1_INTEGRATION'=0.00iops;;;0; 'wiops_centreon-central-1_INTEGRATION'=0.60iops;;;0;
85 'Formation-Reporting - 10.30.2.89' read iops on 'R&D-BI' is 0.00
86 'Formation-Reporting - 10.30.2.89' write iops on 'R&D-BI' is 1.43
87 'centreon-central-1' read iops on 'INTEGRATION' is 0.00
88 'centreon-central-1' write iops on 'INTEGRATION' is 0.60
89
90 Check the health of ESX Servers:
91 ::
92
93 $ 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'
94 OK: All ESX health checks are ok | 'problems_srvi-clus-esx-n2.merethis.net'=0;;;0;299 'problems_srvi-clus-esx-n1.merethis.net'=0;;;0;299 'problems_srvi-clus-esx-n4.merethis.net'=0;;;0;186 'problems_srvi-clus-esx-n3.merethis.net'=0;;;0;186
95 Checking srvi-clus-esx-n2.merethis.net
96 299 health checks are green
97 Checking srvi-clus-esx-n1.merethis.net
98 299 health checks are green
99 Checking srvi-clus-esx-n4.merethis.net
100 186 health checks are green
101 Checking srvi-clus-esx-n3.merethis.net
102 186 health checks are green
103
104 Troubleshooting
105 ---------------
106
107 It is possible to get this kind of errors in the « logs » of « centreon-vmware »:
108 ::
109
110 ...SOAP request error - possibly a protocol issue: read failed: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac...
111
112 VMWare Perl SDK sometimes generates this error that does not alter the behaviour of the connector. The bug comes from OpenSSL. It should be fix in OpenSSL 1.0.1h (CVE-2010-5298).
113
114 You can have the following error returns by the connector:
115 ::
116
117 # perl centreon_plugins.pl --plugin=apps::vmware::connector::plugin ...
118 Cannot get value for counters...
119
120 Please check that your VirtualCenter and ESX time synchronization. Most of the time, the server with the connector and/or VirtualCenter/ESX are not well synchronized.