# Obtain systemd metrics from node-exporter

**URL:** https://forums.percona.com/t/obtain-systemd-metrics-from-node-exporter/15802
**Category:** PMM 2.x
**Tags:** pmm
**Created:** [May 24, 2022, 3:13pm UTC](https://forums.percona.com/t/obtain-systemd-metrics-from-node-exporter/15802 "2022-05-24T15:13:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Prashant\_Warrier](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/prashant_warrier/32/5408_2.png) [@Prashant\_Warrier](https://forums.percona.com/u/Prashant_Warrier)
#### Post date: [May 24, 2022, 3:13pm UTC](https://forums.percona.com/t/obtain-systemd-metrics-from-node-exporter/15802/1 "2022-05-24T15:13:27Z")

</div>

One of the ways we use PMM is to determine if a database instance is up or not.

What we were thinking is to make use of systemd to determine if a database instance is up - i.e. relying on the `systemd_*` metrics. These metrics are exported by `node-exporter`. However, looking at the `node-exporter` process that pmm-agent starts up on a database node, I see that the `systemd` collector is disabled.

here’s the output from `ps` which indicates ☝

```bash
root 3973590 3970067 2 May23 ? 00:37:17 /usr/local/percona/pmm2/exporters/node_exporter --collector.bonding --collector.buddyinfo --collector.cpu --collector.diskstats --collector.entropy --collector.filefd --collector.filesystem --collector.hwmon --collector.loadavg --collector.meminfo --collector.meminfo_numa --collector.netdev --collector.netstat --collector.netstat.fields=^(.*_(InErrors|InErrs|InCsumErrors)|Tcp_(ActiveOpens|PassiveOpens|RetransSegs|CurrEstab|AttemptFails|OutSegs|InSegs|EstabResets|OutRsts|OutSegs)|Tcp_Rto(Algorithm|Min|Max)|Udp_(RcvbufErrors|SndbufErrors)|Udp(6?|Lite6?)_(InDatagrams|OutDatagrams|RcvbufErrors|SndbufErrors|NoPorts)|Icmp6?_(OutEchoReps|OutEchos|InEchos|InEchoReps|InAddrMaskReps|InAddrMasks|OutAddrMaskReps|OutAddrMasks|InTimestampReps|InTimestamps|OutTimestampReps|OutTimestamps|OutErrors|InDestUnreachs|OutDestUnreachs|InTimeExcds|InRedirects|OutRedirects|InMsgs|OutMsgs)|IcmpMsg_(InType3|OutType3)|Ip(6|Ext)_(InOctets|OutOctets)|Ip_Forwarding|TcpExt_(Listen.*|Syncookies.*|TCPTimeouts))$ --collector.processes --collector.standard.go --collector.standard.process --collector.stat --collector.textfile.directory.hr=/usr/local/percona/pmm2/collectors/textfile-collector/high-resolution --collector.textfile.directory.lr=/usr/local/percona/pmm2/collectors/textfile-collector/low-resolution --collector.textfile.directory.mr=/usr/local/percona/pmm2/collectors/textfile-collector/medium-resolution --collector.textfile.hr --collector.textfile.lr --collector.textfile.mr --collector.time --collector.uname --collector.vmstat --collector.vmstat.fields=^(pg(steal_(kswapd|direct)|refill|alloc)_(movable|normal|dma3?2?)|nr_(dirty.*|slab.*|vmscan.*|isolated.*|free.*|shmem.*|i?n?active.*|anon_transparent_.*|writeback.*|unstable|unevictable|mlock|mapped|bounce|page_table_pages|kernel_stack)|drop_slab|slabs_scanned|pgd?e?activate|pgpg(in|out)|pswp(in|out)|pgm?a?j?fault)$ --no-collector.arp --no-collector.bcache --no-collector.conntrack --no-collector.drbd --no-collector.edac --no-collector.infiniband --no-collector.interrupts --no-collector.ipvs --no-collector.ksmd --no-collector.logind --no-collector.mdadm --no-collector.mountstats --no-collector.netclass --no-collector.nfs --no-collector.nfsd --no-collector.ntp --no-collector.qdisc --no-collector.runit --no-collector.sockstat --no-collector.supervisord --no-collector.systemd --no-collector.tcpstat --no-collector.timex --no-collector.wifi --no-collector.xfs --no-collector.zfs --web.disable-exporter-metrics --web.listen-address=:42000

```

**My question is this** - is there a way to set custom flags for this `node-exporter` process? Essentially, what I would like to be able to do is to start `node_exporter` with the `--collector.systemd` flag and remove the `--no-collector.systemd` flag?

---

<div class="post-metadata">

### Author: ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)
#### Post date: [May 25, 2022, 2:17am UTC](https://forums.percona.com/t/obtain-systemd-metrics-from-node-exporter/15802/2 "2022-05-25T02:17:07Z")

</div>

The built-in advisors to PMM will alert you if a database is up or not. There’s no need to change the standard config. If you change the config, you will lose this change when you upgrade.
