This document will monitor interesting elements that we get from our virtual machines based on VMware vSphere, Nagios centralizing the checkeos to do to manage their values, get alerts or generate graphs of your consumption. We see among others the MV checkeos in obtaining the values of your CPU Ready, CPU Wait, Overhead de memoria, memctl, balloning, IOs writing or reading…
Gracias al script ‘check_vmware_api.pl’ already we settled on a previous document, we can move and monitor any parameter now a Virtual Machine, no matter the version we use, because when you install the appropriate SDK will allow us connectivity, sean entornos vSphere 5.x o 6.x. So, If the prerequisites have not installed, I recommend reading!
+ usage - CPU usage in percentage |
+ usagemhz - CPU usage in MHz |
+ wait - CPU wait time in ms |
+ ready - CPU ready time in ms |
+ usage - mem usage in percentage |
+ usagemb - mem usage in MB |
+ swap - swap mem usage in MB |
+ swapin - swapin mem usage in MB |
+ swapout - swapout mem usage in MB |
+ overhead - additional mem used by VM Server in MB |
+ overall - overall mem used by VM Server in MB |
+ active - active mem usage in MB |
+ memctl - mem used by VM memory control driver(vmmemctl) that controls ballooning |
+ usage - overall network usage in KBps(Kilobytes per Second) |
+ receive - receive in KBps(Kilobytes per Second) |
+ send - send in KBps(Kilobytes per Second) |
^ all net info(except usage and no thresholds) |
+ usage - overall disk usage in MB/s |
+ read - read disk usage in MB/s |
+ write - write disk usage in MB/s |
runtime - shows runtime info |
+ cpu - allocated CPU in MHz |
+ mem - allocated mem in MB |
+ state - virtual machine state (UP, DOWN, SUSPENDED) |
+ status - overall object status (gray/green/red/yellow) |
+ consoleconnections - console connections to VM |
+ guest - guest OS status, needs VMware Tools |
+ tools - VMware Tools status |
+ issues - all issues for the host |
These are some of the commands and subcommands that can go to get the information that interests us an MV, we can make the query to a vCenter server or on a host ESXi, followed by the name of the MV as viewed from the vSphere Client. We can analyze any parameter CPU, Memory, Red, Disk or MV status. It would be worth something to us if we try to run it from shell:
./check_vmware.api.pl -D DATA_CENTER | -H DIRECCION_IP_HOST_ESXi -N NOMBRE_MV -f FICHERO_AUTH -l COMANDO -s SUBCOMANDO -w WARNING -c CRITICAL |
It is enough to register the command you need as ever from Centreon, this will be a one time and then call it from each monitoring service that we. In this case I will attack directly to an ESXi host to pinrel so I'll put your IP, but that everyone can set it as you want, against a vCenter would be ideal. “Configuration” > Commands” > duplicamos el ‘check_vmware_api.pl’ we have already created and make a similar one to monitor the MVs. Cumplimentamos at least:
- Command Name: I'll call 'check_vmware_api.pl_VM’ to know that this command will monitor MVs.
- Command Type: Select 'Check'.
- Command Line: It will be what we run the Services to monitor the items in the MVs. Something like this would be worth us where we as arguments when creating the service the name MV, the command, subcommand, the Warning and Critical value:
$USER1$/check_vmware_api.pl -H DIRECCION_IP_HOST_ESXi -N $ARG1$ -f $USER1$/check_vmware_api.auth -l $ARG2$ -s $ARG3$ -w $ARG4$ -c $ARG5$
recorded with “Save”,
And nothing! And it is as simple as creating as many services as you need, since “Configuration” > “Services”. In this case, I create the associated services from each MV Relations, will select the command you just created from the combo, siendo ‘check_vmware_api.pl_VM’, and cumplimentarermos arguments, indicating the name of the MV itself to consult, The command in this type 'cpu’ and the Subomando 'ready’ because that will give us, Ready CPU time having the MV, In addition to indicating the values to alert us and Critical Warning (Here are milliseconds).
And nothing, if we record and export the configuration as we know, we can turn to the monitoring view and see the values we are monitoring, in this case we see times CPU or CPU Ready Wait, as well as write and read throughput in MB / s, and whether the MV is used or Swap Balloning we know are elements that will indicate that the MV is suffering. E interesting to know the state level VMware virtual machine and the status of VMware Tools!!! I enjoy it!
Tidak ada komentar:
Posting Komentar