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

Read current slice setting #12

Open
jangaraj opened this issue Jun 30, 2017 · 1 comment
Open

Read current slice setting #12

jangaraj opened this issue Jun 30, 2017 · 1 comment

Comments

@jangaraj
Copy link
Collaborator

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

@jangaraj jangaraj changed the title Red current slice setting Read current slice setting Jun 30, 2017
@sscheib
Copy link

sscheib commented Jan 1, 2020

I am experiencing the exact same issue with postfix.

root@zabbix:/home/steffen# systemctl show postfix@- | grep ^ControlGroup
ControlGroup=/system.slice/system-postfix.slice/[email protected]
root@zabbix:/home/steffen# 

The module however, tries to lookup the following paths:
Jan 01 20:06:06 zabbix.lan zabbix_agentd[31148]: [systemd] cannot open metric file: '/sys/fs/cgroup/memory/system.slice/[email protected]/memory.stat' Jan 01 20:06:13 zabbix.lan zabbix_agentd[31149]: [systemd] cannot open metric file: '/sys/fs/cgroup/memory/system.slice/postfix.service/memory.stat' Jan 01 20:15:40 zabbix.lan zabbix_agentd[31148]: [systemd] cannot open metric file: '/sys/fs/cgroup/cpu,cpuacct/system.slice/[email protected]/cpuacct.stat' Jan 01 20:15:47 zabbix.lan zabbix_agentd[31149]: [systemd] cannot open metric file: '/sys/fs/cgroup/cpu,cpuacct/system.slice/postfix.service/cpuacct.stat' Jan 01 20:15:50 zabbix.lan zabbix_agentd[31148]: [systemd] cannot open metric file: '/sys/fs/cgroup/cpu,cpuacct/system.slice/networking.service/cpuacct.stat' Jan 01 20:16:06 zabbix.lan zabbix_agentd[31149]: [systemd] cannot open metric file: '/sys/fs/cgroup/memory/system.slice/[email protected]/memory.stat' Jan 01 20:16:13 zabbix.lan zabbix_agentd[31147]: [systemd] cannot open metric file: '/sys/fs/cgroup/memory/system.slice/postfix.service/memory.stat'

Any chance to get a fix on this? Unfortunately, I have no idea of the DBus API at all - otherwise I'd fix it myself.

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

No branches or pull requests

2 participants