Giter Site home page Giter Site logo

zabbix-module-systemd's People

Contributors

ad-m avatar cavaliercoder avatar jangaraj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zabbix-module-systemd's Issues

Cgroup metrics unsupported

On my server, the /sys/fs/cgroup/memory/system.slice/ directory does not exist, but /sys/fs/cgroup/memory/ does with the following content:

$ ls /sys/fs/cgroup/memory
cgroup.clone_children               memory.memsw.failcnt
cgroup.event_control                memory.memsw.limit_in_bytes
cgroup.procs                        memory.memsw.max_usage_in_bytes
cgroup.sane_behavior                memory.memsw.usage_in_bytes
memory.failcnt                      memory.move_charge_at_immigrate
memory.force_empty                  memory.numa_stat
memory.kmem.failcnt                 memory.oom_control
memory.kmem.limit_in_bytes          memory.pressure_level
memory.kmem.max_usage_in_bytes      memory.soft_limit_in_bytes
memory.kmem.slabinfo                memory.stat
memory.kmem.tcp.failcnt             memory.swappiness
memory.kmem.tcp.limit_in_bytes      memory.usage_in_bytes
memory.kmem.tcp.max_usage_in_bytes  memory.use_hierarchy
memory.kmem.tcp.usage_in_bytes      notify_on_release
memory.kmem.usage_in_bytes          release_agent
memory.limit_in_bytes               tasks
memory.max_usage_in_bytes

uname:

Linux server.local 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Feature requests

Thanks Ryan for publishing your systemd module 👍 . I made similar one based on sd-bus API of systemd a few months ago, but I didn't publish it. There is published only cgroup version as a part of docker module. I would like to deprecate my systemd monitoring in favor of your systemd module. I would like to see these features:

  • Filter unit type in unit discovery
    It will simplify creating of LLD rules per unittype. systemd.unit.discovery[<unittype>] - type of discovered unit: service, socket, device, mount, automount, ... Default value probably: all.

  • Cgroup resource monitoring
    For example systemd services are "containers", so you can read their CPU/mem/IOPs metrics from the cgroups
    systemd.cgroup.mem[fid,mmetric], systemd.cgroup.cpu[fid,cmetric], systemd.cgroup.dev[fid,bfile,bmetric] ,...

Not supported item when Service is on inactive state.

Hi,
I have a little issue when a system is in inactive state, the module gives me back a ZBX_NOTSUPPORTED: Failed to lookup object path:

1707:20180420:150015.966 In update_cpustats()
1707:20180420:150015.966 End of update_cpustats()
1707:20180420:150015.967 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
1707:20180420:150016.967 __zbx_zbx_setproctitle() title:'collector [processing data]'
1707:20180420:150016.967 In update_cpustats()
1707:20180420:150016.967 End of update_cpustats()
1707:20180420:150016.967 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
1708:20180420:150016.968 __zbx_zbx_setproctitle() title:'listener #1 [processing request]'
1708:20180420:150016.968 Requested [systemd.service.info[elasticsearchcurator,state]]
1708:20180420:150016.968 [systemd] org.freedesktop.systemd1.NoSuchUnit: Unit elasticsearchcurator.service not loaded.
1708:20180420:150016.968 Sending back [ZBX_NOTSUPPORTED: Failed to lookup object path]
1708:20180420:150016.968 __zbx_zbx_setproctitle() title:'listener #1 [waiting for connection]'
1707:20180420:150017.967 __zbx_zbx_setproctitle() title:'collector [processing data]'
1707:20180420:150017.967 In update_cpustats()
1707:20180420:150017.967 End of update_cpustats()
1707:20180420:150017.967 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
1707:20180420:150018.967 __zbx_zbx_setproctitle() title:'collector [processing data]'
1707:20180420:150018.968 In update_cpustats()
1707:20180420:150018.968 End of update_cpustats()
1707:20180420:150018.968 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
1707:20180420:150019.968 __zbx_zbx_setproctitle() title:'collector [processing data]'
1707:20180420:150019.968 In update_cpustats()
1707:20180420:150019.968 End of update_cpustats()
1707:20180420:150019.968 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
1707:20180420:150020.968 __zbx_zbx_setproctitle() title:'collector [processing data]'
1707:20180420:150020.968 In update_cpustats()
1707:20180420:150020.968 End of update_cpustats()

Any idea?

Thank you.

Monitoring an custom systemctl process

Hi,
how can I monitor an custom systemctl process?
For example i run a service (java process with parameters) with the command:
systemctl start broker.
It run as:
java -server -Xms24g -Xmx24g -XX:MaxDirectMemorySize=56g -XX:+UseG1GC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=75....

Thanks

Log spam

Zabbix 4.2.6 module work fine but got spam in log file

	property: ActiveState
  6678:20190930:015629.347 [systemd] getting property:
	service: org.freedesktop.systemd1
	object path: /org/freedesktop/systemd1/unit/systemd_2dnetworkd_2dwait_2donline_2eservice
	interface: org.freedesktop.systemd1.Unit
	property: ActiveState
  6678:20190930:015629.395 [systemd] in cgroup_cpu()
  6678:20190930:015629.395 [systemd] metric source file: /sys/fs/cgroup/cpu,cpuacct/system.slice/networkd-dispatcher.service/cpuacct.stat
  6678:20190930:015629.395 [systemd] looking metric total in cpuacct.stat/cpu.stat file
  6678:20190930:015629.395 [systemd] unit: networkd-dispatcher.service; metric: total; value: 2
  6679:20190930:015630.493 [systemd] in cgroup_cpu()
  6679:20190930:015630.493 [systemd] metric source file: /sys/fs/cgroup/cpu,cpuacct/system.slice/elasticsearch.service/cpuacct.stat
  6679:20190930:015630.493 [systemd] looking metric total in cpuacct.stat/cpu.stat file
  6679:20190930:015630.493 [systemd] unit: elasticsearch.service; metric: total; value: 10613
  6679:20190930:015630.534 [systemd] in cgroup_mem(()
  6679:20190930:015630.534 [systemd] metric source file: /sys/fs/cgroup/memory/system.slice/zabbix-agent.service/memory.stat
  6679:20190930:015630.535 [systemd] looking metric total_rss in memory.stat file
  6679:20190930:015630.535 [systemd] unit: zabbix-agent.service; metric: total_rss; value: 3694592
  6680:20190930:015630.536 [systemd] getting property:
	service: org.freedesktop.systemd1
	object path: /org/freedesktop/systemd1/unit/vgauth_2eservice
	interface: org.freedesktop.systemd1.Unit
	property: ActiveState
  6678:20190930:015630.565 [systemd] getting property:
	service: org.freedesktop.systemd1
	object path: /org/freedesktop/systemd1/unit/rsyslog_2eservice
	interface: org.freedesktop.systemd1.Unit
	property: ActiveState

Help disable it please...

unsupported module "libzbxsystemd.so" version: 2

Compiled agains 3.x. So why i get this?

31570:20170721:185959.527 using configuration file: /etc/zabbix/zabbix_agentd.conf 31570:20170721:185959.535 unsupported module "libzbxsystemd.so" version: 2 31570:20170721:185959.536 loading modules failed, exiting...

dbus-arch-deps.h: No such file or directory

Hello. I'm trying to build module on Ubuntu 16.04, but got an error at MAKE stage:
/usr/include/dbus-1.0/dbus/dbus.h:29:33: fatal error: dbus/dbus-arch-deps.h: No such file or directory

Please help.

Compile problem

No sure if it problem with my build, but I get following error during compilation with zabbix-3.2.5:

libtool: compile:  x86_64-alt-linux-gcc -DHAVE_CONFIG_H -I. -I../../.. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/zabbix -pipe -Wall -g -O2 -c sb.c -o libzbxsystemd_la-sb.o >/dev/null 2>&1
dbus.c: In function 'dbus_get_property_json':
dbus.c:201:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if ('\0' != buf[0])
     ^~
dbus.c:203:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
       return SUCCEED;
       ^~~~~~
In file included from /usr/include/zabbix/module.h:23:0,
                 from libzbxsystemd.h:14,
                 from libzbxsystemd.c:1:
libzbxsystemd.c: In function 'SYSTEMD_SERVICE_DISCOVERY':
/usr/include/zabbix/zbxtypes.h:162:31: error: called object is not a function or function pointer
 #define ZBX_CONST_STRING(str) ""str
                               ^
/usr/include/zabbix/log.h:58:62: note: in expansion of macro 'ZBX_CONST_STRING'
 # define zabbix_log(level, fmt, ...) __zbx_zabbix_log(level, ZBX_CONST_STRING(fmt), ##__VA_ARGS__)
                                                              ^~~~~~~~~~~~~~~~
libzbxsystemd.c:392:7: note: in expansion of macro 'zabbix_log'
       zabbix_log(LOG_LEVEL_ERR, strdup(LOG_PREFIX "unexpected value type"));
       ^~~~~~~~~~
libzbxsystemd.c:355:29: warning: unused variable 'i' [-Wunused-variable]
   int             type = 0, i = 0;
                             ^
make[2]: *** [libzbxsystemd_la-libzbxsystemd.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
libtool: compile:  x86_64-alt-linux-gcc -DHAVE_CONFIG_H -I. -I../../.. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/zabbix -pipe -Wall -g -O2 -c systemd.c -o libzbxsystemd_la-systemd.o >/dev/null 2>&1
libtool: compile:  x86_64-alt-linux-gcc -DHAVE_CONFIG_H -I. -I../../.. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/zabbix -pipe -Wall -g -O2 -c dbus.c -o libzbxsystemd_la-dbus.o >/dev/null 2>&1
make[2]: Leaving directory `/usr/src/RPM/BUILD/zabbix-module-systemd-1.0.0/src/modules/systemd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/RPM/BUILD/zabbix-module-systemd-1.0.0'
make: *** [all] Error 2
make: Leaving directory `/usr/src/RPM/BUILD/zabbix-module-systemd-1.0.0'
error: Bad exit status from /usr/src/tmp/rpm-tmp.16177 (%build)

here is cutoff from zbxtypes.h:

#define ZBX_STR2UINT64(uint, string) is_uint64(string, &uint)
#define ZBX_OCT2UINT64(uint, string) sscanf(string, ZBX_FS_UO64, &uint)
#define ZBX_HEX2UINT64(uint, string) sscanf(string, ZBX_FS_UX64, &uint)

#define ZBX_STR2UCHAR(var, string) var = (unsigned char)atoi(string)

#define ZBX_CONST_STRING(str) ""str
#define ZBX_CONST_STRLEN(str) (sizeof(ZBX_CONST_STRING(str)) - 1)

typedef struct
{
	zbx_uint64_t	lo;
	zbx_uint64_t	hi;
}
zbx_uint128_t;

I have tried to build with gcc5 (former run for gcc6), but without luck. Quick googling give me no matching answer. Can you help me with that?

Read current slice setting

Some units can use custom slice setting. Use that one for reading of cgroup performance counters (cpu, mem, ....) instead of hardcoded system.slice path. For example:

$  zabbix_get -s 127.0.0.1 -k systemd.unit[[email protected],Service,Slice]
system-getty.slice

Reference: #5

zabbix agent 3.4 unsuported cgroups

I tried to garther some information from the cgroup accounting by service (CPU and mem).

I enabled cgroup inside systemd default config file but the key seems to still be unsuppoted. I am using the provided RPM package (1.2.0 version).

Here is the ouput when trying to retrieve the key.

zabbix_agentd -t systemd.cgroup.cpu[dbus.service,rss]

systemd.cgroup.cpu[dbus.service,rss]          [m|ZBX_NOTSUPPORTED] [Unsupported item key.]
process 26457: arguments to dbus_connection_unref() were incorrect, assertion "connection != NULL" failed in file ../../dbus/dbus-connection.c line 2823.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace

Do you have any clue on where the issue could reside ?

unknown type name ‘DIR’

Hi,

I'am trying to compile this module on Ubuntu 16.04 with zabbix-3.2.6 and get the following error:

make  all-recursive
make[1]: Entering directory '/home/sbe/zabbix-module-systemd'
Making all in src/modules/systemd
make[2]: Entering directory '/home/sbe/zabbix-module-systemd/src/modules/systemd'
/bin/bash ../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../..    -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/home/sbe/zabbix-3.2.6/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -MT libzbxsystemd_la-libzbxcgroups.lo -MD -MP -MF .deps/libzbxsystemd_la-libzbxcgroups.Tpo -c -o libzbxsystemd_la-libzbxcgroups.lo `test -f 'libzbxcgroups.c' || echo './'`libzbxcgroups.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../.. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/home/sbe/zabbix-3.2.6/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -MT libzbxsystemd_la-libzbxcgroups.lo -MD -MP -MF .deps/libzbxsystemd_la-libzbxcgroups.Tpo -c libzbxcgroups.c  -fPIC -DPIC -o .libs/libzbxsystemd_la-libzbxcgroups.o
libzbxcgroups.c: In function ‘cgroup_init’:
libzbxcgroups.c:26:9: error: unknown type name ‘DIR’
         DIR *dir;
         ^
libzbxcgroups.c:52:36: warning: implicit declaration of function ‘opendir’ [-Wimplicit-function-declaration]
                 if (NULL != (dir = opendir(ddir)))
                                    ^
libzbxcgroups.c:52:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 if (NULL != (dir = opendir(ddir)))
                                  ^
libzbxcgroups.c:54:21: warning: implicit declaration of function ‘closedir’ [-Wimplicit-function-declaration]
                     closedir(dir);
                     ^
libzbxcgroups.c: In function ‘SYSTEMD_CGROUP_DEV’:
libzbxcgroups.c:298:9: warning: null argument where non-null required (argument 1) [-Wnonnull]
         char    *stat_file = malloc(strlen(get_rparam(request, 1)) + 2);
         ^
libzbxcgroups.c:299:9: warning: null argument where non-null required (argument 1) [-Wnonnull]
         zbx_strlcpy(stat_file, "/", strlen(get_rparam(request, 1)) + 2);
         ^
libzbxcgroups.c:300:9: warning: null argument where non-null required (argument 1) [-Wnonnull]
         zbx_strlcat(stat_file, get_rparam(request, 1), strlen(get_rparam(request, 1)) + 2);
         ^
Makefile:462: recipe for target 'libzbxsystemd_la-libzbxcgroups.lo' failed
make[2]: *** [libzbxsystemd_la-libzbxcgroups.lo] Error 1
make[2]: Leaving directory '/home/sbe/zabbix-module-systemd/src/modules/systemd'
Makefile:407: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/sbe/zabbix-module-systemd'
Makefile:339: recipe for target 'all' failed
make: *** [all] Error 2

Quick googling give me no matching answer. Can you help me with that?

Error: unknown type name 'DBusBasicValue'

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.

gcc9 complaining about comparison between pointer and zero character constant

Hi @cavaliercoder,

gcc[1] reports this warning,

libzbxsystemd.c: In function ‘SYSTEMD_UNIT_DISCOVERY’:
libzbxsystemd.c:214:35: warning: comparison between pointer and zero character constant [-Wpointer-compare]
  214 |         if(NULL != filter || '\0' != filter)
      |                                   ^~
libzbxsystemd.c:214:38: note: did you mean to dereference the pointer?
  214 |         if(NULL != filter || '\0' != filter)
      |                                      ^

Why do you need to check that in parallel to the correspondent NULL?

[1] gcc (GCC) 9.3.1 20200317 (Red Hat 9.3.1-1)

Include instructions for compiling against 3.0.x packaged versions from yum repos

Compiling the agent module:

  • Download the exact version of the Zabbix sources that correspond to your running version. Mine is 3.0.9, I put it under /root/src
  • yum groupinstall "Development Tools"
  • yum install dbus-devel libtool gettext autoconf automake
  • ./autogen.sh
  • ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib64 --with-zabbix=/root/src/zabbix-3.0.9 (omit --libdir switch if 32 bit machine; replace src download path with your own)
  • make && make install
  • service zabbix-agent restart
  • pidof zabbix_agentd to see if it's running properly

Importing template XML into zabbix:

  • Edit version tag from 3.2 to 3.0
  • Remove empty <httptests /> tag

Template not working with version 3.4

Error: Cannot accurately apply filter: no value received for macro "{#SERVICE.STARTUPNAME}".
https://www.zabbix.com/documentation/3.2/manual/introduction/whatsnew3210

Example:

   {
      "{#SERVICE.TYPE}": "service",
      "{#SERVICE.NAME}": "systemd-sysctl.service",
      "{#SERVICE.DISPLAYNAME}": "Apply Kernel Variables",
      "{#SERVICE.PATH}": "/lib/systemd/system/systemd-sysctl.service",
      "{#SERVICE.STARTUPNAME}": "static",
      "{#SERVICE.CONDITIONRESULT}": "yes"
    },
    {
      "{#SERVICE.TYPE}": "service",
      "{#SERVICE.NAME}": "keyboard-setup.service",
      "{#SERVICE.DISPLAYNAME}": "LSB: Set preliminary keymap",
      "{#SERVICE.PATH}": "/run/systemd/generator.late/keyboard-setup.service",
      "{#SERVICE.CONDITIONRESULT}": "yes"
    },

As you can see {#SERVICE.STARTUPNAME} is missing.

Log spam

Zabbix 4.2.6 module work fine but got spam in log file

property: ActiveState 6678:20190930:015629.347 [systemd] getting property: service: org.freedesktop.systemd1 object path: /org/freedesktop/systemd1/unit/systemd_2dnetworkd_2dwait_2donline_2eservice interface: org.freedesktop.systemd1.Unit property: ActiveState 6678:20190930:015629.395 [systemd] in cgroup_cpu() 6678:20190930:015629.395 [systemd] metric source file: /sys/fs/cgroup/cpu,cpuacct/system.slice/networkd-dispatcher.service/cpuacct.stat 6678:20190930:015629.395 [systemd] looking metric total in cpuacct.stat/cpu.stat file 6678:20190930:015629.395 [systemd] unit: networkd-dispatcher.service; metric: total; value: 2 6679:20190930:015630.493 [systemd] in cgroup_cpu() 6679:20190930:015630.493 [systemd] metric source file: /sys/fs/cgroup/cpu,cpuacct/system.slice/elasticsearch.service/cpuacct.stat 6679:20190930:015630.493 [systemd] looking metric total in cpuacct.stat/cpu.stat file 6679:20190930:015630.493 [systemd] unit: elasticsearch.service; metric: total; value: 10613 6679:20190930:015630.534 [systemd] in cgroup_mem(() 6679:20190930:015630.534 [systemd] metric source file: /sys/fs/cgroup/memory/system.slice/zabbix-agent.service/memory.stat 6679:20190930:015630.535 [systemd] looking metric total_rss in memory.stat file 6679:20190930:015630.535 [systemd] unit: zabbix-agent.service; metric: total_rss; value: 3694592 6680:20190930:015630.536 [systemd] getting property: service: org.freedesktop.systemd1 object path: /org/freedesktop/systemd1/unit/vgauth_2eservice interface: org.freedesktop.systemd1.Unit property: ActiveState 6678:20190930:015630.565 [systemd] getting property: service: org.freedesktop.systemd1 object path: /org/freedesktop/systemd1/unit/rsyslog_2eservice interface: org.freedesktop.systemd1.Unit property: ActiveState

Help disable it please...

Why issue closed? problem not fixed

i set debug level 0 and still see spam

zabbix agent 4.2 loading modules failed

Zabbix agent after upgrade to 4.2.3 is unable to start

 45494:20190611:085514.871 loading modules failed, exiting...
 45625:20190611:085525.753 Starting Zabbix Agent [sz41mon02b]. Zabbix 4.2.3 (revision 3685611ba5).
 45625:20190611:085525.753 **** Enabled features ****
 45625:20190611:085525.753 IPv6 support:          YES
 45625:20190611:085525.753 TLS support:           YES
 45625:20190611:085525.753 **************************
 45625:20190611:085525.753 using configuration file: /etc/zabbix/zabbix_agentd.conf
 45625:20190611:085525.756 cannot load module "libzbxsystemd.so": /usr/lib64/zabbix/modules/libzbxsystemd.so: undefined symbol: __zbx_zbx_snprintf

ZBX_NOTSUPPORTED: Unsupported item key

Hi,
I've compiled and installed module. I see the it into /usr/local/lib/zabbix/modules/libzbxsystemd.so.
I changed paramenters info /etc/systemd/systemconf and I reload then zabbix-agent.

If i call (for example) show this error:
[root@zabbix zabbix-module-systemd]# zabbix_get -s <ip-address> -k systemd[Architecture] ZBX_NOTSUPPORTED: Unsupported item key.

Where is my error?

Missing SERVICE.CONDITIONRESULT in template item prototype

On my CentOS 7 system, the results returned by systemd.service.discovery[] do not include the #SERVICE.CONDITIONRESULT property. As a result, no items are created, because the item prototypes in the template include the filter {#SERVICE.CONDITIONRESULT} matches "yes".
Once I removed that condition, the items showed up.

Cannot accurately apply filter: no value received for macro "{#SERVICE.STARTUPNAME}"

managed to solve SELinux issue by building module, now have another one:when click on Host-discovery rules i have a bunch of following errors
Cannot accurately apply filter: no value received for macro "{#SERVICE.STARTUPNAME}"

macro filter is enabled

systemctl list-unit-files | grep enabled
auditd.service                                enabled
[email protected]                               enabled
chronyd.service                               enabled
cloud-config.service                          enabled
cloud-final.service                           enabled
cloud-init-local.service                      enabled
cloud-init.service                            enabled
crond.service                                 enabled
[email protected]                                enabled
irqbalance.service                            enabled
kdump.service                                 enabled
microcode.service                             enabled
postfix.service                               enabled
qemu-guest-agent.service                      enabled
rhel-autorelabel.service                      enabled
rhel-configure.service                        enabled
rhel-dmesg.service                            enabled
rhel-domainname.service                       enabled
rhel-import-state.service                     enabled
rhel-loadmodules.service                      enabled
rhel-readonly.service                         enabled
rpcbind.service                               enabled
rsyslog.service                               enabled
sshd.service                                  enabled
systemd-readahead-collect.service             enabled
systemd-readahead-drop.service                enabled
systemd-readahead-replay.service              enabled
tuned.service                                 enabled
rpcbind.socket                                enabled
default.target                                enabled
multi-user.target                             enabled
nfs-client.target                             enabled
remote-fs.target                              enabled
runlevel2.target                              enabled
runlevel3.target                              enabled
runlevel4.target                              enabled

Cannot open cpuacct.stat file

Hi!
I'm getting Cannot open cpuacct.stat file error on systemd.cgroup.cpu[{#SERVICE.NAME},total] item with latest zabbix and centos 7.3

Arguments to dbus_connection_unref() were incorrect

Environment:

OS: 4.4.0-81-generic #104-Ubuntu SMP x86_64 GNU/Linux
zabbix-agent: zabbix_agentd (daemon) (Zabbix) 3.2.7
libdbus: libdbus-1-3:amd64 1.10.6-1ubuntu3.3
zabbix-module-systemd: built from 8d2d52a against zabbix-3.2.7 sources.

Steps to reproduce:

Ask zabbix for a systemd.cgroup.* key.

Expected:

No errors/warnings on stderr.

Actual:

arguments to dbus_connection_unref() were incorrect warning.

Example:

$ zabbix_agentd -t systemd.cgroup.mem[dbus.service,rss]
systemd.cgroup.mem[dbus.service,rss]          [u|520192]
process 14252: arguments to dbus_connection_unref() were incorrect, assertion "connection != NULL" failed in file ../../dbus/dbus-connection.c line 2821.
This is normally a bug in some application using the D-Bus library.```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.