You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While runnung grafanaAlerts, we are getting below error:
Traceback (most recent call last):
File "/usr/local/bin/grafanaAlerts", line 9, in
load_entry_point('grafana-alerts==1.0.0.dev7', 'console_scripts', 'grafanaAlerts')()
File "/usr/local/lib/python2.7/site-packages/grafana_alerts/init.py", line 12, in main
return the_launcher.launch()
File "/usr/local/lib/python2.7/site-packages/grafana_alerts/launcher.py", line 16, in launch
alert_checker.check()
File "/usr/local/lib/python2.7/site-packages/grafana_alerts/alerting.py", line 40, in check
for d in dashboard_data_list:
TypeError: 'NoneType' object is not iterable
This the data that we are getting after json.loads(data) in def obtain_dashboards(self)
I'm getting the same error. The jmespath.search command in the DashboardScanner class in alerting.py is not returning anything. This is my "data" value being passed into jmespath.search:
I'm getting the same error of 'NoneType' object is not iterable
Is this issue resolved??
I have 1 dashboard marked monitored
[{"id":1,"title":"New dashboard Copy","uri":"db/new-dashboard-copy","type":"dash-db","tags":["monitored"],"isStarred":false}]
While runnung grafanaAlerts, we are getting below error:
Traceback (most recent call last):
File "/usr/local/bin/grafanaAlerts", line 9, in
load_entry_point('grafana-alerts==1.0.0.dev7', 'console_scripts', 'grafanaAlerts')()
File "/usr/local/lib/python2.7/site-packages/grafana_alerts/init.py", line 12, in main
return the_launcher.launch()
File "/usr/local/lib/python2.7/site-packages/grafana_alerts/launcher.py", line 16, in launch
alert_checker.check()
File "/usr/local/lib/python2.7/site-packages/grafana_alerts/alerting.py", line 40, in check
for d in dashboard_data_list:
TypeError: 'NoneType' object is not iterable
This the data that we are getting after json.loads(data) in def obtain_dashboards(self)
request = urllib2.Request(self.grafana_url + _GRAFANA_URL_PATH_OBTAIN_DASHBOARDS,
headers={"Accept": "application/json",
"Authorization": "Bearer " + self.grafana_token})
contents = urllib2.urlopen(request).read()
print contents
data = json.loads(contents)
[{u'tags': [u'Landing page', u'home page', u'monitored', u'performance'], u'type': u'dash-db', u'title': u'Home Page - Performance Dashboard', u'uri': u'db/home-page-performance-dashboard', u'isStarred': False, u'id': 1}, {u'tags': [u'monitored'], u'type': u'dash-db', u'title': u'test', u'uri': u'db/test', u'isStarred': False, u'id': 11}]
But jmespath.search('dashboards', data) is not returning any values.
Grafana version: 2.1.3
Python verison: 2.7
The text was updated successfully, but these errors were encountered: