noony / prometheus-solr-exporter

Solr exporter for prometheus.
Apache License 2.0
27 stars 18 forks source link

pb avgTimePerRequest #1

Closed imatpro closed 7 years ago

imatpro commented 7 years ago

Hi, and thank for this exporter,

I have this problem when a check metrics :

INFO[0000] Starting solr_exporter (version=0.0.2, branch=master, revision=669193042afd2185c554ce83e0d9c2d0c8d563d5) source="main.go:60" INFO[0000] Build context (go=go1.8, user=root@benchmarkator-01, date=20170627-12:34:08) source="main.go:61" INFO[0000] Listening on :9231 source="main.go:83" ERRO[0008] Failed to unmarshal mbeans query metrics JSON into struct: json: cannot unmarshal string into Go struct field .avgTimePerRequest of type float64 source="exporter.go:313" ERRO[0061] Failed to unmarshal mbeans query metrics JSON into struct: json: cannot unmarshal string into Go struct field .avgTimePerRequest of type float64 source="exporter.go:313"

noony commented 7 years ago

Hi @imatpro, what's your solr version ? It maybe it has changed beetween versions.

imatpro commented 7 years ago

Hi Noony, Thanks for your answers

solr-spec => 4.0.0.2012.10.06.03.04.33 solr-impl => 4.0.0 1394950 - rmuir - 2012-10-06 03:04:33 lucene-spec => 4.0.0 lucene-impl => 4.0.0 1394950 - rmuir - 2012-10-06 03:00:40

my version is too old?

noony commented 7 years ago

I tested with solr-4.10.4 which is the oldest docker solr image I have found, I think it will be hard to work with your version but I will try.

Could you paste the json return by this url : http://YOUR_SOLR_URL:8983/solr/YOUR_CORE/admin/mbeans?stats=true&wt=json&cat=CORE&cat=QUERYHANDLER&cat=UPDATEHANDLER&cat=CACHE

(replace YOUR_SOLR_URL and YOUR_CORE by your values)

noony commented 7 years ago

"avgTimePerRequest": "NaN", This is that ?

noony commented 7 years ago

Thanks I will debug that this night.

noony commented 7 years ago

@imatpro , can you test the latest release please :)

noony commented 7 years ago

I've added the grafana dashboard too : https://grafana.com/dashboards/2551

imatpro commented 7 years ago

Thanks you very much @noony It's working perfectly,

If you come to Paris, I pay you a beer

noony commented 7 years ago

No problem, thanks for reporting and I'm already in Paris !