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

Script metrics-jstat.rb return "IndexError: list index out of range" #29

Open
rsaliou opened this issue Nov 8, 2017 · 1 comment
Open

Comments

@rsaliou
Copy link

rsaliou commented Nov 8, 2017

Hello

I am just trying to get jstat metrics in Sensu with sensu-plugins-java
I launched "metrics-jstat.rb -D -H localhost -j Server" and got error message "IndexError: list index out of range"
It use jstat from java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64 on CentOS Linux release 7.4.1708
Else version of others packages are: sensu-1.1.1-1.el7.x86_64

Best regards.
rsf

$ metrics-jstat.rb -D -H localhost -j Server
Traceback (most recent call last):
File "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-java-1.3.0/bin/metrics-jstat.py", line 315, in
JstatMetricsToGraphiteFormat().main()
File "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-java-1.3.0/bin/metrics-jstat.py", line 268, in main
gc_stats = get_jstat_metrics("-gc", lvmid, metric_maps_gc)
File "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-java-1.3.0/bin/metrics-jstat.py", line 243, in get_jstat_metrics
return dict([(metric_maps[title], values[position]) for position, title in enumerate(titles) if title in metric_maps])
IndexError: list index out of range

@rsaliou
Copy link
Author

rsaliou commented Nov 8, 2017

The other script metrics-java-heap-graphite.rb works

$ metrics-java-heap-graphite.rb -n Server
JVMs.0.Server.Meta_Capacity 89.0859 1510134125
JVMs.0.Server.Meta_Util 80.9297 1510134125
JVMs.0.Server.Max_Heap 512 1510134125
JVMs.0.Server.Committed_Heap 324.5 1510134125
JVMs.0.Server.Heap_Util 98.3389 1510134125
JVMs.0.Server.Eden_Util 2.08887 1510134125
JVMs.0.Server.Survivor_Util 23.6719 1510134125
JVMs.0.Server.Old_Util 72.5781 1510134125

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

1 participant