Ad Widget
Collapse
VMware monitoring with Zabbix, Python & vPoller
Collapse
X
-
Hi Guys
If possible I need some help with this, I am running Zabbix 3.0.3 and am trying to do the make for the vpoller module so that I can add it to one of my proxies. My problem is the below is what I get when running it.
root@vsproxy:~/zabbix-3.0.3/src/modules/vpoller-module# make
cc -fPIC -shared -o vpoller.so vpoller.c -I../../../include -I/usr/local/include -L/usr/local/lib -lzmq
In file included from ../../../include/threads.h:23:0,
from vpoller.c:32:
../../../include/common.h:879:105: error: unknown type name 'time_t'
int calculate_item_nextcheck(zbx_uint64_t seed, int item_type, int delay, const char *custom_intervals, time_t now);
^
../../../include/common.h:880:1: error: unknown type name 'time_t'
time_t calculate_proxy_nextcheck(zbx_uint64_t hostid, unsigned int delay, time_t now);
^
../../../include/common.h:880:75: error: unknown type name 'time_t'
time_t calculate_proxy_nextcheck(zbx_uint64_t hostid, unsigned int delay, time_t now);
^
../../../include/common.h:881:43: error: unknown type name 'time_t'
int check_time_period(const char *period, time_t now);
^
../../../include/common.h:882:18: error: unknown type name 'u_char'
char zbx_num2hex(u_char c);
^
../../../include/common.h:883:1: error: unknown type name 'u_char'
u_char zbx_hex2num(char c);
^
../../../include/common.h:920:26: warning: 'struct tm' declared inside parameter list [enabled by default]
void zbx_get_time(struct tm *tm, long *milliseconds, zbx_timezone_t *tz);
^
../../../include/common.h:920:26: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
../../../include/common.h:1013:20: error: unknown type name 'time_t'
char *zbx_date2str(time_t date);
^
../../../include/common.h:1014:20: error: unknown type name 'time_t'
char *zbx_time2str(time_t time);
^
In file included from vpoller.c:32:0:
../../../include/threads.h:55:28: error: unknown type name 'pid_t'
#define ZBX_THREAD_HANDLE pid_t
^
../../../include/threads.h:87:1: note: in expansion of macro 'ZBX_THREAD_HANDLE'
ZBX_THREAD_HANDLE zbx_thread_start(ZBX_THREAD_ENTRY_POINTER(handler) , zbx_thread_args_t *thread_args);
^
../../../include/threads.h:55:28: error: unknown type name 'pid_t'
#define ZBX_THREAD_HANDLE pid_t
^
../../../include/threads.h:88:23: note: in expansion of macro 'ZBX_THREAD_HANDLE'
int zbx_thread_wait(ZBX_THREAD_HANDLE thread);
^
In file included from vpoller.c:35:0:
vpoller.c: In function 'zbx_module_vpoller':
vpoller.c:234:28: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
SET_MSG_RESULT(result, strdup("Invalid number of arguments"));
^
../../../include/module.h:132:24: note: in definition of macro 'SET_MSG_RESULT'
(res)->msg = (char *)(val) \
^
In file included from ../../../include/threads.h:23:0,
from vpoller.c:32:
../../../include/common.h:703:3: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]
free(ptr); \
^
vpoller.c:256:3: note: in expansion of macro 'zbx_free'
zbx_free(key_esc);
^
In file included from vpoller.c:35:0:
vpoller.c:260:28: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
SET_MSG_RESULT(result, strdup("Cannot create a ZeroMQ socket"));
^
../../../include/module.h:132:24: note: in definition of macro 'SET_MSG_RESULT'
(res)->msg = (char *)(val) \
^
vpoller.c:283:32: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
zmq_send(zsocket, msg_buf, strlen(msg_buf), 0);
^
In file included from vpoller.c:35:0:
vpoller.c:308:25: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
SET_MSG_RESULT(result, strdup("Cannot create a ZeroMQ socket"));
^
../../../include/module.h:132:24: note: in definition of macro 'SET_MSG_RESULT'
(res)->msg = (char *)(val) \
^
vpoller.c:322:28: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
SET_MSG_RESULT(result, strdup("Did not receive response from vPoller"));
^
../../../include/module.h:132:24: note: in definition of macro 'SET_MSG_RESULT'
(res)->msg = (char *)(val) \
^
vpoller.c:326:26: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
SET_STR_RESULT(result, strdup(zmq_msg_data(&msg_in)));
^
../../../include/module.h:111:24: note: in definition of macro 'SET_STR_RESULT'
(res)->str = (char *)(val) \
^
vpoller.c: In function 'zbx_module_vpoller_echo':
vpoller.c:350:28: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
SET_MSG_RESULT(result, strdup("Invalid number of key parameters"));
^
../../../include/module.h:132:24: note: in definition of macro 'SET_MSG_RESULT'
(res)->msg = (char *)(val) \
^
vpoller.c:356:26: warning: incompatible implicit declaration of built-in function 'strdup' [enabled by default]
SET_STR_RESULT(result, strdup(param));
^
../../../include/module.h:111:24: note: in definition of macro 'SET_STR_RESULT'
(res)->str = (char *)(val) \
^
make: *** [vpoller] Error 1
root@vsproxy:~/zabbix-3.0.3/src/modules/vpoller-module#4 Zabbix Frontend Servers (Load balanced)
2 Zabbix App Servers (HA)
2 Zabbix Database Servers (HA)
18 Zabbix Proxy Servers (HA)
3897 Deployed Zabbix Agents
6161 Values per second
X-Layer Integration
Jaspersoft report Servers (HA)Comment
-
i think yo are missing some libraries.
can you try the following:
WARNING: all packages will be Upgrades. please dont try this (wihtout backup) on any production systemsudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essentialComment
-
Have tried that but still get the same error.
had a look at all requirement packages as stated in all of the install docs but still no luck4 Zabbix Frontend Servers (Load balanced)
2 Zabbix App Servers (HA)
2 Zabbix Database Servers (HA)
18 Zabbix Proxy Servers (HA)
3897 Deployed Zabbix Agents
6161 Values per second
X-Layer Integration
Jaspersoft report Servers (HA)Comment
-
I got past all of those errors (Re-installed the server)
Now when I run the make for the module to build I get the following
Makefile:5: *** missing separator. Stop.
Any ideas on how to get it sorted??4 Zabbix Frontend Servers (Load balanced)
2 Zabbix App Servers (HA)
2 Zabbix Database Servers (HA)
18 Zabbix Proxy Servers (HA)
3897 Deployed Zabbix Agents
6161 Values per second
X-Layer Integration
Jaspersoft report Servers (HA)Comment
-
Got past the previous error (Blond me when downloading the files from Git)
New error when doing the make is as follow:
root@zabbvsproxy:~/zabbix-3.0.3/src/modules/vpoller-module# make
cc -fPIC -shared -o vpoller.so vpoller.c -I../../../include -I/usr/local/include -L/usr/local/lib -lzmq
In file included from ../../../include/common.h:23:0,
from ../../../include/threads.h:23,
from vpoller.c:32:
../../../include/sysinc.h:42:23: fatal error: winsock2.h: No such file or directory
# include <winsock2.h>
^
compilation terminated.
make: *** [vpoller] Error 1
root@zabbvsproxy:~/zabbix-3.0.3/src/modules/vpoller-module#4 Zabbix Frontend Servers (Load balanced)
2 Zabbix App Servers (HA)
2 Zabbix Database Servers (HA)
18 Zabbix Proxy Servers (HA)
3897 Deployed Zabbix Agents
6161 Values per second
X-Layer Integration
Jaspersoft report Servers (HA)Comment
-
So after a late night and a lot of misreading I got it all to work.
Currently if I look in Zabbix GUI I can see that it gets the VMware vSphere Events correctly but for everything else that it finds it comes back with (on the latest data page)
cannot find object SERVER01
But if I look at the log from vpoller-worker as Zabbix requests info it shows
Retrieving properties for SERVER01 managed object of type vim."all different ones"
Does anyone have some in site to what can cause this output I am getting4 Zabbix Frontend Servers (Load balanced)
2 Zabbix App Servers (HA)
2 Zabbix Database Servers (HA)
18 Zabbix Proxy Servers (HA)
3897 Deployed Zabbix Agents
6161 Values per second
X-Layer Integration
Jaspersoft report Servers (HA)Comment
-
Hi all, I know there has been no post on this for an while.
On my monitoring it works well but for some of the metrics I do get the following issues
Cannot find object
Unknown or missing agent name
Has anyone else seen this and if so what can I do to fix it.4 Zabbix Frontend Servers (Load balanced)
2 Zabbix App Servers (HA)
2 Zabbix Database Servers (HA)
18 Zabbix Proxy Servers (HA)
3897 Deployed Zabbix Agents
6161 Values per second
X-Layer Integration
Jaspersoft report Servers (HA)Comment
-
can you tell us the metrics + vsphere version running?
perhaps the command, so i can check this in my environmentComment
-
@Michael
On the vSphere Template for vPoller for Zabbix, all of the metrics that it can pull.
version of vSphere is 6.0 update 24 Zabbix Frontend Servers (Load balanced)
2 Zabbix App Servers (HA)
2 Zabbix Database Servers (HA)
18 Zabbix Proxy Servers (HA)
3897 Deployed Zabbix Agents
6161 Values per second
X-Layer Integration
Jaspersoft report Servers (HA)Comment
-
Hi All
Update to where we are on this.
Between all of the templates that ships with vpoller for Zabbix the default "Template VMware vSphere - vPoller Native" works perfectly as it does not require any strange names or components to be passed.
But for all of the other templates that ship with it I get the following message in Zabbix "Unknown or missing agent name" I do have the name in the Macro that I also used to test from the vconnect-cli and from there it works perfectly.
But in Zabbix I get the message.
Any help in what can cause this would be greatly appreciated
Thanks4 Zabbix Frontend Servers (Load balanced)
2 Zabbix App Servers (HA)
2 Zabbix Database Servers (HA)
18 Zabbix Proxy Servers (HA)
3897 Deployed Zabbix Agents
6161 Values per second
X-Layer Integration
Jaspersoft report Servers (HA)Comment
-
Hi All
On my only template that is currently working, there is an item (vpoller["event.latest", "{HOST.HOST}", "null", "event", "null"]) that pulls all information from the vSphere events (Like below)
2017-06-21 13:34:30
"Alarm 'Virtual machine memory usage' on Server01 changed from Gray to Green"
2017-06-21 13:33:30
"DRS migrated Server02 from vmware01.cluster.com to vmware02.cluster.com in cluster client01 in NDC1"
2017-06-21 13:32:30
"Migrating Server02 off host vmware01.cluster.com in NDC1"
2017-06-21 13:31:30
"Alarm 'Host CPU usage' on vmware02.cluster.com changed from Yellow to Green"
2017-06-21 13:30:30
"Alarm 'Virtual machine memory usage' on Server03 changed from Gray to Green"
2017-06-21 13:29:30
"Alarm 'Virtual machine memory usage' on Server04 changed from Gray to Green"
2017-06-21 13:28:30
"Alarm 'Virtual machine memory usage' on Server01 changed from Gray to Green"
I need to create triggers for this but not sure on how to go about this as it is not log data that I am receiving
Any help on how to go about this.
Thanks4 Zabbix Frontend Servers (Load balanced)
2 Zabbix App Servers (HA)
2 Zabbix Database Servers (HA)
18 Zabbix Proxy Servers (HA)
3897 Deployed Zabbix Agents
6161 Values per second
X-Layer Integration
Jaspersoft report Servers (HA)Comment
Comment