Skip to content

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

@rsaliou

Description

@rsaliou

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions