Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: unknown type name 'DBusBasicValue' #13

Open
cavaliercoder opened this issue Jul 1, 2017 · 1 comment
Open

Error: unknown type name 'DBusBasicValue' #13

cavaliercoder opened this issue Jul 1, 2017 · 1 comment

Comments

@cavaliercoder
Copy link
Collaborator

The DBusBasicValue type was introduced to the API somewhere prior to D-Bus v1.6.0.

When trying to build this module on older versions, the following compiler error is encountered:

libzbxsystemd.c: In function 'SYSTEMD_UNIT_DISCOVERY':
libzbxsystemd.c:147:3: error: unknown type name 'DBusBasicValue'
libzbxsystemd.c:205:40: error: request for member 'str' in something not a structure or union
libzbxsystemd.c:209:53: error: request for member 'str' in something not a structure or union
libzbxsystemd.c:213:60: error: request for member 'str' in something not a structure or union
libzbxsystemd.c:217:58: error: request for member 'str' in something not a structure or union
libzbxsystemd.c:221:60: error: request for member 'str' in something not a structure or union
libzbxsystemd.c:225:57: error: request for member 'str' in something not a structure or union
libzbxsystemd.c:229:59: error: request for member 'str' in something not a structure or union
libzbxsystemd.c:232:65: error: request for member 'str' in something not a structure or union
libzbxsystemd.c:233:66: error: request for member 'str' in something not a structure or union
libzbxsystemd.c:234:62: error: request for member 'str' in something not a structure or union
libzbxsystemd.c: In function 'SYSTEMD_SERVICE_DISCOVERY':
libzbxsystemd.c:396:3: error: unknown type name 'DBusBasicValue'
libzbxsystemd.c:445:17: error: request for member 'str' in something not a structure or union

This is apparent when built on CentOS 6 or Ubuntu Precise.

@jangaraj
Copy link
Collaborator

jangaraj commented Jul 5, 2017

If there is no easy code workaround, then it should be module limitation. Operation workaround can use container. Container with Zabbix systemd module will have D-Bus v1.6.0+ installed and mounted /var/run/dbus/system_bus_socket from the host => container can communicate with host D-Bus API.

You can test it - the latest Docker image monitoringartist/dockbix-agent-xxl-limited:latest includes systemd monitoring module now:

[root@ansiblemaster ~]# cat /etc/centos-release
CentOS release 6.6 (Final)
[root@ansiblemaster ~]# docker run \
>   --name=dockbix-agent-xxl \
>   --net=host \
>   --privileged \
>   -v /:/rootfs \
>   -v /var/run:/var/run \
>   -e "ZA_Server=<ZABBIX SERVER IP/DNS NAME>" \
>   -e "ZA_ServerActive=<ZABBIX SERVER IP/DNS NAME>" \
>   -d monitoringartist/dockbix-agent-xxl-limited:latest
[root@ansiblemaster ~]# zabbix_get -s 127.0.0.1 -k systemd.service.discovery
ZBX_NOTSUPPORTED: Failed to connect to D-Bus.
# ^ this is not systemd centos 6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants