Ad Widget
Collapse
ESXi 4.0 Hardware and Software Monitoring VMWare
Collapse
X
-
zabbix_get works but via Zabbix server/gui no files are created
Hi dima_dm,
I'm struggeling for weeks to get WBEM to work. (I haven't started on the API part besides the pre-requisites and scripts on the correct places).
I'm using a ML110 with P212 controller so alterations to the script has been made but these were minor.
running the Zabbix_get -s localhost -k WBEM[Esxi 5 host IP,password,user] works and gives me the output in the correct file in /tmp.
It does run in the Gui in Zabbix (checked with debuglevel 4 on both the server and agent)
Running debuglevel 4 with grep on WBEM I see:
28842:20120409:020431.004 In substitute_simple_macros() data:'WBEM[{$HOST},{$PASSWORD},{$USERNAME}]'
28842:20120409:020431.005 End substitute_simple_macros() data:'WBEM[192.168.130.10,simple_pwd,root]'
28842:20120409:020431.005 In evaluate_function() function:'WWESX02:WBEM[192.168.130.10,simple_pwd,root].nodata(14400)'
**for simple_pwd I don't use any special characters anymore...starting with an ! is not the best option in this case, I already learned.***
Furthermore, I checked the ownership.
Where I ran this from the shell it gets the correct permissions like:
-rw-rw-r-- 1 zabbix zabbix 470 2012-04-09 03:04 vmware_192.168.130.10.txt
Running
zabbix_get -s localhost -k Temperature[192.168.130.10,2]
gives me the output from the file.
Within the zabbix_agentd.conf I changed the following to overcome differences between 127.0.0.1 and localhost:
Server=localhost,::ffff:127.0.0.1
Can you provide me a solution to overcome the fact that no data besides icmpping is getting in Zabbix?
Thnx in advance!Comment
-
Thnx for your swift response.
I'm using Ubuntu 10.4 64bit without SELinux. Apparmor was not restrictive on perl but I stopped and removed it with (just to be sure):
sudo /etc/init.d/apparmor stop
sudo update-rc.d -f apparmor remove
No firewall is active e.g. ufw is off.
Do you want me to send some screens or something else?Comment
-
zabbix_get works but via Zabbix server/gui no files are created
Hi dima_dm,
How stupid from me....sorry to bother you with this one, I mixed the $HOST variable IP address with the IP address.
Thnx for the help and the great job you are doing!
I'v created a ML110G6 + ESXi 5 template.
Base Template used is Template_VMWare_HP_DL360_G6_ESXi4.1
Create a copy of zabbix_wbem_vmware.pl and call it zabbix_wbem_vmware_ml110.pl
Comment the following line and save it:
# ,"SMX_PowerSupplyModule"=>["Name","OperationalStatus"]
Add the following to the zabbix_agentd.conf:
UserParameter=WBEM_ML110[*],/etc/zabbix/zabbix_wbem_vmware_ml110.pl $1 $2 $3
UserParameter=Fan_ML110[*],egrep -i "$2:" /tmp/vmware_$1.txt|sed 's/.*\t//'
Changes made to the Template_VMWare_HP_DL360_G6_ESXi4.1
Removed items:
Proc2
Powersupply entries (2x) - no substitutions available within CIM.
FAN_3
FAN_4
Temperature 9 until Temperature 27
Temperature Celsius 8 until Temperature Celsius 27
Removed Macro's from template:
{$VOLUME} disk_array
Removed Graphs:
Temperature 10-19
Temperature 20-27
Changed items:
FAN_1 to Fan CPU Fan_ML110[{$HOST},CPU_FAN_at_Unknown_Physical_Location]
FAN_2 to Fan Rear Fan_ML110[{$HOST},REAR_FAN_at_Unknown_Physical_Location]
WBEM client status WBEM_ML110[{$HOST},{$PASSWORD},{$USERNAME}]
Changed & Added items:
Volume.Capacity Array {$VOLUME1} in Byte Volume.Free[{$HOST},{$VOLUME1}]
Array_1 Command_Latency.average Array_stat[{$HOST},1,Command_Latency.average]
Extra Array's to be made after initial run so Array's can be added.
Added value mapping:
HP Hardware status
0 ⇒ Unknown
2 ⇒ OK
3 ⇒ Degraded
5 ⇒ Predictive Failure
6 ⇒ ERROR
To be used with:
Diskarray
Fan CPU
Fan Rear
Proc 1
System_Memory
Temperature 0 until 8
Extra Macros to be made within the host macros:
{$VOLUME1} = <ESXi datastore1 name>
{$VOLUME2} = <ESXi datastore2 name>
Extra datastores to be added (if applicable) within the macros and item clones to be made accordingly.Attached FilesLast edited by duncankennedy; 12-04-2012, 23:25. Reason: Extra template and instructions added ML110G6 + ESXi 5.0Comment
-
-
-
we are trying to use zabbix_perl_api_vmware.pl: we've configured both server and agent timeout to max. 30s, but the status file seems not created successfully under /tmp, the log from agentd says:
egrep: /tmp/vmware_api_x.x.x.x.txt: No such file or directory
and we check there is no such file auto created under /tmp by zabbix. But if we manually run this perl script with user zabbix, the status file created under /tmp no problem at all, and with correct mode.
Now we doubt it's caused by its slow running as when we time it, it's 28s, quite close 30s.
time /etc/zabbix/zabbix_perl_api_vmware.pl
real 0m28.214s
user 0m18.322s
sys 0m0.093s
the zabbix server load is around 0.1 and ESXi hosts load is less than 0.1, we test a couple ESXi hosts, all is more than 25s. Is there any way we can tune it? rather than increasing the zabbix server max. timeout to 60s via modifying the source code?Comment
-
I was having the same issues running on a WAN connection. It took about 2 minutes to complete.
For now (in case of the WAN connection) I run a cronjob every 10 minutes to overcome this because changing the timeout larger than 30 seconds will the agent refuse to startup.
*/10 * * * * /etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl <IP adres> <pwd> <user> >/dev/null 2>&1
Beware that the scripts are placed within a different directory in the above listing.Comment
Comment