neuralfraud / grafana-prtg

A PRTG Datasource plugin for Grafana
180 stars 75 forks source link

Cannot read property 'match' of undefined #44

Closed Abolah closed 7 years ago

Abolah commented 7 years ago

Hello, I encountered this error after adding the PRTG DataSource to my grafan installation.

image

I'm using Grafana 4.3.2 and PRTG API version: 17.1.28.1032+

Can you help me fix this ?

g3rhard commented 7 years ago

Hello, i think, i have the same issue, periodically i see that message. screenshot_12 Grafana 4.3.1 PRTG API version: 16.4.27.7140+

packtman commented 7 years ago

@neuralfraud I am facing the same error. 'Cannot read property 'objid' of undefined'. Can you please have a look at it.

2017-07-13 12_02_47-grafana - sensor

neuralfraud commented 7 years ago

Cant read objid means an unsuccessful query - i.e. narrow time range, or bad query, or use of the "!" channel which is just plain buggy (i know)

packtman commented 7 years ago

I am using the PRTG-Veeam Script by Markus: https://github.com/mycloudrevolution/Advanced-PRTG-Sensors/blob/master/Veeam/PRTG-VeeamBRStats.ps1

https://kb.paessler.com/en/topic/72030-monitoring-veeam-backup-replication-without-veeam-enterprise-manager

Other script of his is working fine: https://kb.paessler.com/en/topic/72033-monitoring-veeam-backup-replication-using-veeam-enterprise-manager

neuralfraud commented 7 years ago

@packtman I will check out that Veeam script and let you know how it works. Give the Development branch a try though, many fixes. Should be a direct drop in replacement (remove the old "jasonlashua-prtg-datasource" directory first!)

neuralfraud commented 7 years ago

@Abolah Hi, this is caused by a bug in the code, it's supposed to display an error from the PRTG api, but my code sucks, so it just throws an exception instead. If I come across it again I'll try to fix it.

neuralfraud commented 7 years ago

@g3rhard based on the line of code, it looks like it is doing the "get sensor by name" routine, and expecting a sensor item to be present, there is no sensor item present. What was the sensor you had selected in the query that resulted in that message?

neuralfraud commented 7 years ago

This looks like a couple of separate bugs.

the "cannot read 'objId' of undefined issue should be fixed in the Development branch. The "property match of 'undefined'" issue however, still remains.

I will update master once I've conducted thorough testing of the development code in a production setting.

packtman commented 7 years ago

@neuralfraud previously with the 'Cannot read property 'objid' of undefined' I wasn't able to see metrics under Channel. Now, after updating to latest release I am able to see metrics under channel, but along with a new error: 'Cannot read property 'length' of undefined' 2017-07-17 10_43_25-grafana - sensor

neuralfraud commented 7 years ago

This is closed. Version 4.0 is now in the master branch. Upgrade today!