# Error getting list of running units

**URL:** <https://discuss.elastic.co/t/error-getting-list-of-running-units/233544>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [May 20, 2020, 1:22pm UTC](https://discuss.elastic.co/t/error-getting-list-of-running-units/233544 "2020-05-20T13:22:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deny7](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@Deny7](https://discuss.elastic.co/u/Deny7)\
**Post date:** [May 20, 2020, 1:22pm UTC](https://discuss.elastic.co/t/error-getting-list-of-running-units/233544/1 "2020-05-20T13:22:54Z")

</div>

Hi, I just installed metricbeat-oss-7.6.2-x86\_64.rpm. I configured system.yml but when I run it as service I get errors in logs:

> 2020-05-20T14:52:44.744+0200 INFO module/wrapper.go:252 Error fetching data for metricset system.service: error getting list of running units: Unknown method 'ListUnitsByPatterns' or interface 'org.freedesktop.systemd1.Manager'.

I guess It has something to do with rights and service metricset, /etc/metricbeat is owned by root. I also tried to run metricbeat with **--strict.perms=false** by defining in metricbeat.service:

> ExecStart=/usr/share/metricbeat/bin/metricbeat --strict.perms=false $BEAT\_CONFIG\_OPTS $BEAT\_PATH\_OPTS

But still getting same error, can anybody help?

**System.yml**

```
- module: system
  period: 5s
  metricsets:
    - cpu
    - load
    - memory
    - network
    - process
    - process_summary
    - service
    #- core
    - diskio
    #- socket
  processes: ['nginx','java','httpd']
  process.include_top_n:
    by_cpu: 5 # include top 5 processes by CPU
    by_memory: 5 # include top 5 processes by memory

- module: system
  period: 1m
  metricsets:
    - filesystem
    - fsstat
  processors:
  - drop_event.when.regexp:
      system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)'

- module: system
  period: 15m
  metricsets:
    - uptime

#- module: system
# period: 5m
# metricsets:
# - raid
# raid.mount_point: '/'

```

---

<div class="post-metadata">

**Author:** ![Alex\_Kristiansen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_kristiansen/32/46086_2.png) [@Alex\_Kristiansen](https://discuss.elastic.co/u/Alex_Kristiansen)\
**Post date:** [May 29, 2020, 8:35pm UTC](https://discuss.elastic.co/t/error-getting-list-of-running-units/233544/2 "2020-05-29T20:35:13Z")

</div>

@Deny7 Can you give us more details on the operating system you're running this on? Metricbeat appears to be a native systemd service running as root, correct?

Can you send the output of the following:  
`gdbus introspect --system --dest org.freedesktop.systemd1 --object-path /org/freedesktop/systemd1 | grep ListUnits` (this may require you to install an extra package)

`systemctl --version`

---

<div class="post-metadata">

**Author:** ![nabeel\_ahmed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nabeel_ahmed/32/65455_2.png) [@nabeel\_ahmed](https://discuss.elastic.co/u/nabeel_ahmed)\
**Post date:** [June 3, 2020, 8:09am UTC](https://discuss.elastic.co/t/error-getting-list-of-running-units/233544/3 "2020-06-03T08:09:00Z")

</div>

Facing the same issue on CentOS, running metric beat system module,  
Version of systemd is :

```auto
systemd 219
 +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN

```

 ![Screenshot 2020-06-03 at 12.30.07 PM](https://us1.discourse-cdn.com/elastic/original/3X/e/2/e24fc0cdecd53efa92779597842c67c2bc9f1931.jpeg)  
Can we enable some setting or other workaround to solve this, other then upgradation of systemd?

Kindly help!

---

<div class="post-metadata">

**Author:** ![nabeel\_ahmed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nabeel_ahmed/32/65455_2.png) [@nabeel\_ahmed](https://discuss.elastic.co/u/nabeel_ahmed)\
**Post date:** [June 3, 2020, 11:25am UTC](https://discuss.elastic.co/t/error-getting-list-of-running-units/233544/4 "2020-06-03T11:25:36Z")

</div>

Tested with latest metricbeat 7.7, events are not generating for service metric set, also no clear error reported

```auto
Command output:
    [root@lux-00-00-02 metricbeat]# gdbus introspect --system --dest org.freedesktop.systemd1 --object-path /org/freedesktop/systemd1 | grep ListUnits
          ListUnits(out a(ssssssouso) arg_0);
          ListUnitsFiltered(in as arg_0,

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 1, 2020, 11:39am UTC](https://discuss.elastic.co/t/error-getting-list-of-running-units/233544/5 "2020-07-01T11:39:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
