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

eror with --collectors.enabled with more than 9 metrics/options #673

Closed
jcmartins opened this issue Sep 6, 2017 · 9 comments
Closed

eror with --collectors.enabled with more than 9 metrics/options #673

jcmartins opened this issue Sep 6, 2017 · 9 comments

Comments

@jcmartins
Copy link

systemctl status node_exporter.service -l
● node_exporter.service - Prometheus Node_Exporter
Loaded: loaded (/usr/lib/systemd/system/node_exporter.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2017-09-06 11:58:57 UTC; 1s ago
Main PID: 12106 (node_exporter)
Memory: 1.4M
CGroup: /system.slice/node_exporter.service
└─12106 /opt/node_exporter/node_exporter --web.listen-address=:9100 --collectors.enabled=cpu,stat,diskstats,filesystem,loadavg,meminfo,uname,nfs,netdev,time

Sep 06 11:58:57 prometheus.localdomain node_exporter[12106]: time="2017-09-06T11:58:57Z" level=info msg=" - time" source="node_exporter.go:159"
Sep 06 11:58:57 prometheus.localdomain node_exporter[12106]: time="2017-09-06T11:58:57Z" level=info msg=" - uname" source="node_exporter.go:159"
Sep 06 11:58:57 prometheus.localdomain node_exporter[12106]: time="2017-09-06T11:58:57Z" level=info msg=" - netdev" source="node_exporter.go:159"
Sep 06 11:58:57 prometheus.localdomain node_exporter[12106]: time="2017-09-06T11:58:57Z" level=info msg=" - cpu" source="node_exporter.go:159"
Sep 06 11:58:57 prometheus.localdomain node_exporter[12106]: time="2017-09-06T11:58:57Z" level=info msg=" - stat" source="node_exporter.go:159"
Sep 06 11:58:57 prometheus.localdomain node_exporter[12106]: time="2017-09-06T11:58:57Z" level=info msg=" - diskstats" source="node_exporter.go:159"
Sep 06 11:58:57 prometheus.localdomain node_exporter[12106]: time="2017-09-06T11:58:57Z" level=info msg=" - filesystem" source="node_exporter.go:159"
Sep 06 11:58:57 prometheus.localdomain node_exporter[12106]: time="2017-09-06T11:58:57Z" level=info msg=" - loadavg" source="node_exporter.go:159"
Sep 06 11:58:57 prometheus.localdomain node_exporter[12106]: time="2017-09-06T11:58:57Z" level=info msg=" - meminfo" source="node_exporter.go:159"
Sep 06 11:58:57 prometheus.localdomain node_exporter[12106]: time="2017-09-06T11:58:57Z" level=info msg="Listening on :9100" source="node_exporter.go:183"

###uname -a
Linux prometheus.localdomain 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

###node_exporter --version
node_exporter, version 0.14.0 (branch: master, revision: abb58a3)
build user: vrx_jmartins@ni-77000-0
build date: 20170905-14:07:23
go version: go1.9

make

formatting code
vetting code
running staticcheck
building binaries
node_exporter
running tests
ok github.com/prometheus/node_exporter 1.021s
ok github.com/prometheus/node_exporter/collector 1.052s
? github.com/prometheus/node_exporter/collector/ganglia [no test files]
running tests in 32-bit mode
ok github.com/prometheus/node_exporter 0.005s
ok github.com/prometheus/node_exporter/collector 0.013s
? github.com/prometheus/node_exporter/collector/ganglia [no test files]
running end-to-end tests
./end-to-end-test.sh

node_exporter command line flags

I'm run int by systemd: cat /usr/lib/systemd/system/node_exporter.service
[Unit]
Description=Prometheus Node_Exporter

[Service]
Type=simple
ExecStart=/opt/node_exporter/node_exporter --web.listen-address=:9100 --collectors.enabled=cpu,stat,diskstats,filesystem,loadavg,meminfo,uname,nfs,netdev,time

[Install]
WantedBy=default.target

Are you running node_exporter in Docker?

Not in docker....
Direct in CentOS 7 with the lastest updates...

What did you do that produced an error?

Run
systemctl stop node_exporter.service
systemctl start node_exporter.service
systemctl status node_exporter.service -l
and run again
systemctl stop node_exporter.service
systemctl start node_exporter.service
systemctl status node_exporter.service -l

What did you expect to see?

I expected to see all my 10 metrics/options in
--collectors.enabled=cpu,stat,diskstats,filesystem,loadavg,meminfo,uname,nfs,netdev,time

What did you see instead?

I see only 9 metrics/options and it's "randon" (not the same all time)

@SuperQ
Copy link
Member

SuperQ commented Sep 8, 2017

cpu is not a collector that is supported in 0.14.0. See the output of the -collectors.print command from 0.14.0.

$ ./node_exporter -collectors.print
INFO[0000] Starting node_exporter (version=0.14.0, branch=master, revision=840ba5dcc71a084a3bc63cb6063003c1f94435a6)  source="node_exporter.go:140"
INFO[0000] Build context (go=go1.7.5, user=root@bb6d0678e7f3, date=20170321-12:12:54)  source="node_exporter.go:141"
Available collectors:
 - bonding
 - buddyinfo
 - conntrack
 - diskstats
 - drbd
 - edac
 - entropy
 - filefd
 - filesystem
 - gmond
 - hwmon
 - infiniband
 - interrupts
 - ipvs
 - ksmd
 - loadavg
 - logind
 - mdadm
 - megacli
 - meminfo
 - meminfo_numa
 - mountstats
 - netdev
 - netstat
 - nfs
 - ntp
 - runit
 - sockstat
 - stat
 - supervisord
 - systemd
 - tcpstat
 - textfile
 - time
 - uname
 - vmstat
 - wifi
 - zfs

The cpu collector was re-factored out of the stat collector, but this is un-released.

@jcmartins
Copy link
Author

@SuperQ my branch revision is different than yours please see my ouptput

node_exporter --collectors.print
INFO[0000] Starting node_exporter (version=0.14.0, branch=master, revision=abb58a31e238c85c392ba5f9cb4a04a70badb8ce) source="node_exporter.go:137"
INFO[0000] Build context (go=go1.9, user=jcmartins@xxxx, date=20170905-14:07:23) source="node_exporter.go:138"
Available collectors:

  • arp
  • bcache
  • bonding
  • buddyinfo
  • conntrack
    - cpu
  • diskstats
  • drbd
  • edac
  • entropy
  • filefd
  • filesystem
  • gmond
  • hwmon
  • infiniband
  • interrupts
  • ipvs
  • ksmd
  • loadavg
  • logind
  • mdadm
  • megacli
  • meminfo
  • meminfo_numa
  • mountstats
  • netdev
  • netstat
  • nfs
  • ntp
  • qdisc
  • runit
  • sockstat
  • stat
  • supervisord
  • systemd
  • tcpstat
  • textfile
  • time
  • uname
  • vmstat
  • wifi
  • xfs
  • zfs

@SuperQ
Copy link
Member

SuperQ commented Sep 8, 2017

Ahh, I see, you're building from source. Sorry, I missed that.

This may be an artifact of the switch to kingpin flags. We're eliminating the collectors list flag and switching to boolean flags per collector. See: #640

@brian-brazil
Copy link
Contributor

I don't see any errors in the output you shared. What exactly is going wrong?

@SuperQ
Copy link
Member

SuperQ commented Sep 28, 2017

@brian-brazil The nfs collector is missing from the log as enabled. This will be solved by #640.

@brian-brazil
Copy link
Contributor

That's not the full log, just the last 10 lines.

@SuperQ
Copy link
Member

SuperQ commented Sep 28, 2017

Ahh, right, @jcmartins please provide the full log output with journalctl -u node_exporter.service.

@mdlayher
Copy link
Contributor

mdlayher commented Oct 6, 2017

Now that 0.15 has been released and these flags have been revamped, is this issue still valid?

@mdlayher
Copy link
Contributor

Closing since I'm pretty sure this was taken care of with the flag revamp. Feel free to re-open if needed.

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

No branches or pull requests

4 participants