Skip to content

Instantly share code, notes, and snippets.

@womchik
Created March 13, 2020 09:34
Show Gist options
  • Save womchik/f77ceebee40499d32ead0f2f1ce0c744 to your computer and use it in GitHub Desktop.
Save womchik/f77ceebee40499d32ead0f2f1ce0c744 to your computer and use it in GitHub Desktop.
# Ansible managed: modified on 17-10-2019 10:50:31 by wom
[Unit]
Description=Prometheus node exporter service
After=network.target
Wants=network.target
[Service]
ExecStart=/opt/node_exporter-0.18.1.linux-amd64/node_exporter --collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$" --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/) --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$ --collector.netclass.ignored-devices=^$ --collector.netdev.ignored-devices=^$ --collector.netstat.fields=^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*)|Tcp_(ActiveOpens|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts))$ --collector.ntp.server=127.0.0.1 --collector.ntp.protocol-version=4 --collector.ntp.ip-ttl=1 --path.rootfs=/ --collector.runit.servicedir=/etc/service --collector.systemd.unit-whitelist=.+ --collector.systemd.unit-blacklist="(systemd-modules-load.+|lvm2-lvmetad.+|sys-kernel-config\\.mount|postgresql\\.service|user@\\d+\\.service|zfs-.+\\.service|fstrim\\.service|apt-daily.*)" --collector.vmstat.fields=^(oom_kill|pgpg|pswp|pg.*fault).* --web.listen-address=10.203.0.19:9100 --web.telemetry-path=/metrics --log.level=error --collector.cpu --collector.meminfo --collector.netdev --collector.netstat --collector.stat --collector.uname --collector.vmstat --collector.systemd
Restart=always
RestartSec=20
TimeoutSec=300
User=prometheus
Group=prometheus
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment