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

KeyError: 'hide' #7

Closed
flyersa opened this issue Jul 22, 2015 · 9 comments
Closed

KeyError: 'hide' #7

flyersa opened this issue Jul 22, 2015 · 9 comments

Comments

@flyersa
Copy link

flyersa commented Jul 22, 2015

Hi,

i am testing this and setup a proper dashboard. But everytime i run grafanaAlerts i get a trace:

[<grafana_alerts.alerting.AlertChecker instance at 0x21ecf80>, <grafana_alerts.alerting.AlertChecker instance at 0x21ec248>]
Traceback (most recent call last):
File "/usr/bin/grafanaAlerts", line 9, in
load_entry_point('grafana-alerts==1.0.0.dev6', 'console_scripts', 'grafanaAlerts')()
File "/usr/lib/python2.6/site-packages/grafana_alerts/init.py", line 12, in main
return the_launcher.launch()
File "/usr/lib/python2.6/site-packages/grafana_alerts/launcher.py", line 16, in launch
alert_checker.check()
File "/usr/lib/python2.6/site-packages/grafana_alerts/alerting.py", line 50, in check
alert_checker.check()
File "/usr/lib/python2.6/site-packages/grafana_alerts/alerting.py", line 99, in check
if not grafana_target['hide']:
KeyError: 'hide'

whats wrong here?

@pabloa
Copy link
Owner

pabloa commented Jul 22, 2015

Hello

What grafana version are you using?

Pablo

On Wed, Jul 22, 2015 at 5:32 AM, flyersa notifications@github.com wrote:

Hi,

i am testing this and setup a proper dashboard. But everytime i run
grafanaAlerts i get a trace:

[, ]
Traceback (most recent call last):
File "/usr/bin/grafanaAlerts", line 9, in
load_entry_point('grafana-alerts==1.0.0.dev6', 'console_scripts',
'grafanaAlerts')()
File "/usr/lib/python2.6/site-packages/grafana_alerts/init.py", line
12, in main
return the_launcher.launch()
File "/usr/lib/python2.6/site-packages/grafana_alerts/launcher.py", line
16, in launch
alert_checker.check()
File "/usr/lib/python2.6/site-packages/grafana_alerts/alerting.py", line
50, in check
alert_checker.check()
File "/usr/lib/python2.6/site-packages/grafana_alerts/alerting.py", line
99, in check
if not grafana_target['hide']:
KeyError: 'hide'

whats wrong here?


Reply to this email directly or view it on GitHub
#7.

@flyersa
Copy link
Author

flyersa commented Jul 23, 2015

2.0.2

Am 22.07.2015 um 23:28 schrieb pabloa:

Hello

What grafana version are you using?

Pablo

On Wed, Jul 22, 2015 at 5:32 AM, flyersa notifications@github.com wrote:

Hi,

i am testing this and setup a proper dashboard. But everytime i run
grafanaAlerts i get a trace:

[, ]
Traceback (most recent call last):
File "/usr/bin/grafanaAlerts", line 9, in
load_entry_point('grafana-alerts==1.0.0.dev6', 'console_scripts',
'grafanaAlerts')()
File "/usr/lib/python2.6/site-packages/grafana_alerts/init.py", line
12, in main
return the_launcher.launch()
File "/usr/lib/python2.6/site-packages/grafana_alerts/launcher.py", line
16, in launch
alert_checker.check()
File "/usr/lib/python2.6/site-packages/grafana_alerts/alerting.py", line
50, in check
alert_checker.check()
File "/usr/lib/python2.6/site-packages/grafana_alerts/alerting.py", line
99, in check
if not grafana_target['hide']:
KeyError: 'hide'

whats wrong here?


Reply to this email directly or view it on GitHub
#7.


Reply to this email directly or view it on GitHub
#7 (comment).

Clavain Technologies
Enrico Kern

Heerstraße 366
13593 Berlin

GERMANY

WEB: http://www.clavain.com
TEL: +49 (30) 54818753
FAX: +49 (180) 5233633-548

@pabloa
Copy link
Owner

pabloa commented Jul 23, 2015

Hello Flyersa

Could you please call grafana-alerts from a terminal and paste the output?

Pablo

@flyersa
Copy link
Author

flyersa commented Jul 24, 2015

Hi of course:

ananke ~]# grafanaAlerts
{"dashboards":[{"id":8,"title":"Berlin
Office","slug":"berlin-office","tags":["monitored"],"isStarred":false}],"tags":[],"tagsOnly":false}
[{u'slug': u'berlin-office', u'tags': [u'monitored'], u'isStarred':
False, u'id': 8, u'title': u'Berlin Office'}]
Dashboard: Berlin Office
Contents is:
{"meta":{"isStarred":false,"isHome":false,"isSnapshot":false,"slug":"berlin-office","expires":"0001-01-01T00:00:00Z","created":"0001-01-01T00:00:00Z"},"model":{"annotations":{"list":[]},"editable":true,"hideControls":false,"id":8,"nav":[{"collapse":false,"enable":true,"notice":false,"now":true,"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"status":"Stable","time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"],"type":"timepicker"}],"originalTitle":"Berlin
Office","refresh":"5m","rows":[{"collapse":false,"editable":true,"height":"250px","panels":[{"aliasColors":{},"bars":false,"datasource":null,"decimals":2,"editable":true,"error":false,"fill":1,"grid":{"leftLogBase":1,"leftMax":null,"leftMin":null,"rightLogBase":1,"rightMax":null,"rightMin":null,"threshold1":27,"threshold1Color":"rgba(234,
93, 8, 0.27)","threshold2":30,"threshold2Color":"rgba(241, 0, 0,
0.22)","thresholdLine":false},"height":"500","id":1,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":true,"min":true,"rightSide":true,"show":true,"total":false,"values":true},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"span":12,"stack":false,"steppedLine":false,"targets":[{"alias":"Temperatur","column":"temperature","condition":"","function":"mean","groupby_field":"temperature","interval":"","query":"select
temperature from "homatic" where
$timeFilter","rawQuery":true,"series":"logstash"}],"timeFrom":null,"timeShift":null,"title":"Serverroom
Temperature","tooltip":{"shared":false,"value_type":"cumulative"},"type":"graph","x-axis":true,"y-axis":true,"y_formats":["celsius","short"]},{"content":"x\u003c=35;
critical;
mail@mydomain.com","editable":true,"error":false,"id":3,"links":[],"mode":"markdown","span":3,"style":{},"title":"alerts","type":"text"}],"title":"Row"},{"collapse":false,"editable":true,"height":"250px","panels":[{"aliasColors":{},"bars":false,"datasource":null,"editable":true,"error":false,"fill":1,"grid":{"leftLogBase":1,"leftMax":null,"leftMin":null,"rightLogBase":1,"rightMax":null,"rightMin":null,"threshold1":null,"threshold1Color":"rgba(216,
200, 27, 0.27)","threshold2":null,"threshold2Color":"rgba(234, 112, 112,
0.22)"},"height":"300","id":2,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":true,"min":true,"rightSide":true,"show":true,"total":false,"values":true},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"span":12,"stack":false,"steppedLine":false,"targets":[{"alias":"Humidy","column":"value","function":"mean","query":"select
humidy from "homatic" where
$timeFilter","rawQuery":true}],"timeFrom":null,"timeShift":null,"title":"Humidity","tooltip":{"shared":false,"value_type":"cumulative"},"type":"graph","x-axis":true,"y-axis":true,"y_formats":["humidity","short"]}],"title":"New
row"}],"schemaVersion":6,"sharedCrosshair":false,"style":"dark","tags":["office","in-house","monitored"],"templating":{"list":[]},"time":{"from":"now-6h","to":"now"},"timezone":"browser","title":"Berlin
Office","version":17}}
[{u'bars': False, u'timeFrom': None, u'links': [], u'height': u'500',
u'renderer': u'flot', u'linewidth': 2, u'steppedLine': False, u'id': 1,
u'fill': 1, u'span': 12, u'title': u'Serverroom Temperature',
u'tooltip': {u'shared': False, u'value_type': u'cumulative'}, u'legend':
{u'rightSide': True, u'total': False, u'min': True, u'max': True,
u'show': True, u'current': True, u'values': True, u'alignAsTable': True,
u'avg': False}, u'targets': [{u'function': u'mean', u'groupby_field':
u'temperature', u'rawQuery': True, u'column': u'temperature', u'series':
u'logstash', u'interval': u'', u'alias': u'Temperatur', u'query':
u'select temperature from "homatic" where $timeFilter', u'condition':
u''}], u'seriesOverrides': [], u'percentage': False, u'type': u'graph',
u'x-axis': True, u'error': False, u'editable': True, u'grid':
{u'leftMax': None, u'threshold2': 30, u'rightLogBase': 1, u'rightMax':
None, u'threshold1': 27, u'leftLogBase': 1, u'thresholdLine': False,
u'threshold2Color': u'rgba(241, 0, 0, 0.22)', u'rightMin': None,
u'threshold1Color': u'rgba(234, 93, 8, 0.27)', u'leftMin': None},
u'nullPointMode': u'connected', u'stack': False, u'y-axis': True,
u'timeShift': None, u'aliasColors': {}, u'lines': True, u'points':
False, u'datasource': None, u'pointradius': 5, u'decimals': 2,
u'y_formats': [u'celsius', u'short']}, {u'style': {}, u'span': 3,
u'links': [], u'title': u'alerts', u'editable': True, u'content':
u'x<=35; critical; enrico.kern@glispamedia.com', u'mode': u'markdown',
u'error': False, u'type': u'text', u'id': 3}]
{u'bars': False, u'timeFrom': None, u'links': [], u'height': u'500',
u'renderer': u'flot', u'linewidth': 2, u'steppedLine': False, u'id': 1,
u'fill': 1, u'span': 12, u'title': u'Serverroom Temperature',
u'tooltip': {u'shared': False, u'value_type': u'cumulative'}, u'legend':
{u'rightSide': True, u'total': False, u'min': True, u'max': True,
u'show': True, u'current': True, u'values': True, u'alignAsTable': True,
u'avg': False}, u'targets': [{u'function': u'mean', u'groupby_field':
u'temperature', u'rawQuery': True, u'column': u'temperature', u'series':
u'logstash', u'interval': u'', u'alias': u'Temperatur', u'query':
u'select temperature from "homatic" where $timeFilter', u'condition':
u''}], u'seriesOverrides': [], u'percentage': False, u'type': u'graph',
u'x-axis': True, u'error': False, u'editable': True, u'grid':
{u'leftMax': None, u'threshold2': 30, u'rightLogBase': 1, u'rightMax':
None, u'threshold1': 27, u'leftLogBase': 1, u'thresholdLine': False,
u'threshold2Color': u'rgba(241, 0, 0, 0.22)', u'rightMin': None,
u'threshold1Color': u'rgba(234, 93, 8, 0.27)', u'leftMin': None},
u'nullPointMode': u'connected', u'stack': False, u'y-axis': True,
u'timeShift': None, u'aliasColors': {}, u'lines': True, u'points':
False, u'datasource': None, u'pointradius': 5, u'decimals': 2,
u'y_formats': [u'celsius', u'short']}
graph
{u'style': {}, u'span': 3, u'links': [], u'title': u'alerts',
u'editable': True, u'content': u'x<=35; critical; mail@mydomain.com',
u'mode': u'markdown', u'error': False, u'type': u'text', u'id': 3}
text
[{u'bars': False, u'timeFrom': None, u'links': [], u'height': u'300',
u'renderer': u'flot', u'linewidth': 2, u'steppedLine': False, u'id': 2,
u'fill': 1, u'span': 12, u'title': u'Humidity', u'tooltip': {u'shared':
False, u'value_type': u'cumulative'}, u'legend': {u'rightSide': True,
u'total': False, u'min': True, u'max': True, u'show': True, u'current':
True, u'values': True, u'alignAsTable': True, u'avg': False},
u'targets': [{u'column': u'value', u'alias': u'Humidy', u'function':
u'mean', u'rawQuery': True, u'query': u'select humidy from "homatic"
where $timeFilter'}], u'seriesOverrides': [], u'percentage': False,
u'type': u'graph', u'x-axis': True, u'error': False, u'editable': True,
u'grid': {u'leftMax': None, u'threshold2': None, u'rightLogBase': 1,
u'rightMax': None, u'threshold1': None, u'leftLogBase': 1,
u'threshold2Color': u'rgba(234, 112, 112, 0.22)', u'rightMin': None,
u'threshold1Color': u'rgba(216, 200, 27, 0.27)', u'leftMin': None},
u'nullPointMode': u'connected', u'stack': False, u'y-axis': True,
u'timeShift': None, u'aliasColors': {}, u'lines': True, u'points':
False, u'datasource': None, u'pointradius': 5, u'y_formats':
[u'humidity', u'short']}]
{u'bars': False, u'timeFrom': None, u'links': [], u'height': u'300',
u'renderer': u'flot', u'linewidth': 2, u'steppedLine': False, u'id': 2,
u'fill': 1, u'span': 12, u'title': u'Humidity', u'tooltip': {u'shared':
False, u'value_type': u'cumulative'}, u'legend': {u'rightSide': True,
u'total': False, u'min': True, u'max': True, u'show': True, u'current':
True, u'values': True, u'alignAsTable': True, u'avg': False},
u'targets': [{u'column': u'value', u'alias': u'Humidy', u'function':
u'mean', u'rawQuery': True, u'query': u'select humidy from "homatic"
where $timeFilter'}], u'seriesOverrides': [], u'percentage': False,
u'type': u'graph', u'x-axis': True, u'error': False, u'editable': True,
u'grid': {u'leftMax': None, u'threshold2': None, u'rightLogBase': 1,
u'rightMax': None, u'threshold1': None, u'leftLogBase': 1,
u'threshold2Color': u'rgba(234, 112, 112, 0.22)', u'rightMin': None,
u'threshold1Color': u'rgba(216, 200, 27, 0.27)', u'leftMin': None},
u'nullPointMode': u'connected', u'stack': False, u'y-axis': True,
u'timeShift': None, u'aliasColors': {}, u'lines': True, u'points':
False, u'datasource': None, u'pointradius': 5, u'y_formats':
[u'humidity', u'short']}
graph
[<grafana_alerts.alerting.AlertChecker instance at 0x13f3f80>,
<grafana_alerts.alerting.AlertChecker instance at 0x13f3248>]
Traceback (most recent call last):
File "/usr/bin/grafanaAlerts", line 9, in
load_entry_point('grafana-alerts==1.0.0.dev6', 'console_scripts',
'grafanaAlerts')()
File "/usr/lib/python2.6/site-packages/grafana_alerts/init.py",
line 12, in main
return the_launcher.launch()
File "/usr/lib/python2.6/site-packages/grafana_alerts/launcher.py",
line 16, in launch
alert_checker.check()
File "/usr/lib/python2.6/site-packages/grafana_alerts/alerting.py",
line 50, in check
alert_checker.check()
File "/usr/lib/python2.6/site-packages/grafana_alerts/alerting.py",
line 99, in check
if not grafana_target['hide']:
KeyError: 'hide'

Am 23.07.2015 um 19:45 schrieb pabloa:

Hello Flyersa

Could you please call grafana-alerts from a terminal and paste the output?

Pablo


Reply to this email directly or view it on GitHub
#7 (comment).

Clavain Technologies
Enrico Kern

Heerstraße 366
13593 Berlin

GERMANY

WEB: http://www.clavain.com
TEL: +49 (30) 54818753
FAX: +49 (180) 5233633-548

@pabloa pabloa closed this as completed Jul 27, 2015
@pabloa
Copy link
Owner

pabloa commented Jul 27, 2015

Hello Flyersa.

Please update and try again. Version grafana_alerts 1.0.0.dev7 should solve the issue.

Let me go how it goes.

Pablo

@flyersa
Copy link
Author

flyersa commented Jul 28, 2015

Hi,

checked out latest from git and now its another error, same but not with
hide but "target"

grafanaAlerts
{"dashboards":[{"id":8,"title":"Berlin
Office","slug":"berlin-office","tags":["monitored"],"isStarred":false}],"tags":[],"tagsOnly":false}
[{u'slug': u'berlin-office', u'tags': [u'monitored'], u'isStarred':
False, u'id': 8, u'title': u'Berlin Office'}]
Dashboard: Berlin Office
Contents is:
{"meta":{"isStarred":false,"isHome":false,"isSnapshot":false,"slug":"berlin-office","expires":"0001-01-01T00:00:00Z","created":"0001-01-01T00:00:00Z"},"model":{"annotations":{"list":[]},"editable":true,"hideControls":false,"id":8,"nav":[{"collapse":false,"enable":true,"notice":false,"now":true,"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"status":"Stable","time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"],"type":"timepicker"}],"originalTitle":"Berlin
Office","refresh":"5m","rows":[{"collapse":false,"editable":true,"height":"250px","panels":[{"aliasColors":{},"bars":false,"datasource":null,"decimals":2,"editable":true,"error":false,"fill":1,"grid":{"leftLogBase":1,"leftMax":null,"leftMin":null,"rightLogBase":1,"rightMax":null,"rightMin":null,"threshold1":27,"threshold1Color":"rgba(234,
93, 8, 0.27)","threshold2":30,"threshold2Color":"rgba(241, 0, 0,
0.22)","thresholdLine":false},"height":"500","id":1,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":true,"min":true,"rightSide":true,"show":true,"total":false,"values":true},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"span":12,"stack":false,"steppedLine":false,"targets":[{"alias":"Temperatur","column":"temperature","condition":"","function":"mean","groupby_field":"temperature","interval":"","query":"select
temperature from "homatic" where
$timeFilter","rawQuery":true,"series":"logstash"}],"timeFrom":null,"timeShift":null,"title":"Serverroom
Temperature","tooltip":{"shared":false,"value_type":"cumulative"},"type":"graph","x-axis":true,"y-axis":true,"y_formats":["celsius","short"]},{"content":"x\u003c=35;
critical;
enrico.kern@glispamedia.com","editable":true,"error":false,"id":3,"links":[],"mode":"markdown","span":3,"style":{},"title":"alerts","type":"text"}],"title":"Row"},{"collapse":false,"editable":true,"height":"250px","panels":[{"aliasColors":{},"bars":false,"datasource":null,"editable":true,"error":false,"fill":1,"grid":{"leftLogBase":1,"leftMax":null,"leftMin":null,"rightLogBase":1,"rightMax":null,"rightMin":null,"threshold1":null,"threshold1Color":"rgba(216,
200, 27, 0.27)","threshold2":null,"threshold2Color":"rgba(234, 112, 112,
0.22)"},"height":"300","id":2,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":true,"min":true,"rightSide":true,"show":true,"total":false,"values":true},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"span":12,"stack":false,"steppedLine":false,"targets":[{"alias":"Humidy","column":"value","function":"mean","query":"select
humidy from "homatic" where
$timeFilter","rawQuery":true}],"timeFrom":null,"timeShift":null,"title":"Humidity","tooltip":{"shared":false,"value_type":"cumulative"},"type":"graph","x-axis":true,"y-axis":true,"y_formats":["humidity","short"]}],"title":"New
row"}],"schemaVersion":6,"sharedCrosshair":false,"style":"dark","tags":["office","in-house","monitored"],"templating":{"list":[]},"time":{"from":"now-6h","to":"now"},"timezone":"browser","title":"Berlin
Office","version":17}}
[{u'bars': False, u'timeFrom': None, u'links': [], u'height': u'500',
u'renderer': u'flot', u'linewidth': 2, u'steppedLine': False, u'id': 1,
u'fill': 1, u'span': 12, u'title': u'Serverroom Temperature',
u'tooltip': {u'shared': False, u'value_type': u'cumulative'}, u'legend':
{u'rightSide': True, u'total': False, u'min': True, u'max': True,
u'show': True, u'current': True, u'values': True, u'alignAsTable': True,
u'avg': False}, u'targets': [{u'function': u'mean', u'groupby_field':
u'temperature', u'rawQuery': True, u'column': u'temperature', u'series':
u'logstash', u'interval': u'', u'alias': u'Temperatur', u'query':
u'select temperature from "homatic" where $timeFilter', u'condition':
u''}], u'seriesOverrides': [], u'percentage': False, u'type': u'graph',
u'x-axis': True, u'error': False, u'editable': True, u'grid':
{u'leftMax': None, u'threshold2': 30, u'rightLogBase': 1, u'rightMax':
None, u'threshold1': 27, u'leftLogBase': 1, u'thresholdLine': False,
u'threshold2Color': u'rgba(241, 0, 0, 0.22)', u'rightMin': None,
u'threshold1Color': u'rgba(234, 93, 8, 0.27)', u'leftMin': None},
u'nullPointMode': u'connected', u'stack': False, u'y-axis': True,
u'timeShift': None, u'aliasColors': {}, u'lines': True, u'points':
False, u'datasource': None, u'pointradius': 5, u'decimals': 2,
u'y_formats': [u'celsius', u'short']}, {u'style': {}, u'span': 3,
u'links': [], u'title': u'alerts', u'editable': True, u'content':
u'x<=35; critical; enrico.kern@glispamedia.com', u'mode': u'markdown',
u'error': False, u'type': u'text', u'id': 3}]
{u'bars': False, u'timeFrom': None, u'links': [], u'height': u'500',
u'renderer': u'flot', u'linewidth': 2, u'steppedLine': False, u'id': 1,
u'fill': 1, u'span': 12, u'title': u'Serverroom Temperature',
u'tooltip': {u'shared': False, u'value_type': u'cumulative'}, u'legend':
{u'rightSide': True, u'total': False, u'min': True, u'max': True,
u'show': True, u'current': True, u'values': True, u'alignAsTable': True,
u'avg': False}, u'targets': [{u'function': u'mean', u'groupby_field':
u'temperature', u'rawQuery': True, u'column': u'temperature', u'series':
u'logstash', u'interval': u'', u'alias': u'Temperatur', u'query':
u'select temperature from "homatic" where $timeFilter', u'condition':
u''}], u'seriesOverrides': [], u'percentage': False, u'type': u'graph',
u'x-axis': True, u'error': False, u'editable': True, u'grid':
{u'leftMax': None, u'threshold2': 30, u'rightLogBase': 1, u'rightMax':
None, u'threshold1': 27, u'leftLogBase': 1, u'thresholdLine': False,
u'threshold2Color': u'rgba(241, 0, 0, 0.22)', u'rightMin': None,
u'threshold1Color': u'rgba(234, 93, 8, 0.27)', u'leftMin': None},
u'nullPointMode': u'connected', u'stack': False, u'y-axis': True,
u'timeShift': None, u'aliasColors': {}, u'lines': True, u'points':
False, u'datasource': None, u'pointradius': 5, u'decimals': 2,
u'y_formats': [u'celsius', u'short']}
graph
{u'style': {}, u'span': 3, u'links': [], u'title': u'alerts',
u'editable': True, u'content': u'x<=35; critical;
enrico.kern@glispamedia.com', u'mode': u'markdown', u'error': False,
u'type': u'text', u'id': 3}
text
[{u'bars': False, u'timeFrom': None, u'links': [], u'height': u'300',
u'renderer': u'flot', u'linewidth': 2, u'steppedLine': False, u'id': 2,
u'fill': 1, u'span': 12, u'title': u'Humidity', u'tooltip': {u'shared':
False, u'value_type': u'cumulative'}, u'legend': {u'rightSide': True,
u'total': False, u'min': True, u'max': True, u'show': True, u'current':
True, u'values': True, u'alignAsTable': True, u'avg': False},
u'targets': [{u'column': u'value', u'alias': u'Humidy', u'function':
u'mean', u'rawQuery': True, u'query': u'select humidy from "homatic"
where $timeFilter'}], u'seriesOverrides': [], u'percentage': False,
u'type': u'graph', u'x-axis': True, u'error': False, u'editable': True,
u'grid': {u'leftMax': None, u'threshold2': None, u'rightLogBase': 1,
u'rightMax': None, u'threshold1': None, u'leftLogBase': 1,
u'threshold2Color': u'rgba(234, 112, 112, 0.22)', u'rightMin': None,
u'threshold1Color': u'rgba(216, 200, 27, 0.27)', u'leftMin': None},
u'nullPointMode': u'connected', u'stack': False, u'y-axis': True,
u'timeShift': None, u'aliasColors': {}, u'lines': True, u'points':
False, u'datasource': None, u'pointradius': 5, u'y_formats':
[u'humidity', u'short']}]
{u'bars': False, u'timeFrom': None, u'links': [], u'height': u'300',
u'renderer': u'flot', u'linewidth': 2, u'steppedLine': False, u'id': 2,
u'fill': 1, u'span': 12, u'title': u'Humidity', u'tooltip': {u'shared':
False, u'value_type': u'cumulative'}, u'legend': {u'rightSide': True,
u'total': False, u'min': True, u'max': True, u'show': True, u'current':
True, u'values': True, u'alignAsTable': True, u'avg': False},
u'targets': [{u'column': u'value', u'alias': u'Humidy', u'function':
u'mean', u'rawQuery': True, u'query': u'select humidy from "homatic"
where $timeFilter'}], u'seriesOverrides': [], u'percentage': False,
u'type': u'graph', u'x-axis': True, u'error': False, u'editable': True,
u'grid': {u'leftMax': None, u'threshold2': None, u'rightLogBase': 1,
u'rightMax': None, u'threshold1': None, u'leftLogBase': 1,
u'threshold2Color': u'rgba(234, 112, 112, 0.22)', u'rightMin': None,
u'threshold1Color': u'rgba(216, 200, 27, 0.27)', u'leftMin': None},
u'nullPointMode': u'connected', u'stack': False, u'y-axis': True,
u'timeShift': None, u'aliasColors': {}, u'lines': True, u'points':
False, u'datasource': None, u'pointradius': 5, u'y_formats':
[u'humidity', u'short']}
graph
[<grafana_alerts.alerting.AlertChecker instance at 0xcf8fc8>,
<grafana_alerts.alerting.AlertChecker instance at 0xcf8290>]
Traceback (most recent call last):
File "/usr/bin/grafanaAlerts", line 9, in
load_entry_point('grafana-alerts==1.0.0.dev7', 'console_scripts',
'grafanaAlerts')()
File
"/usr/lib/python2.6/site-packages/grafana_alerts-1.0.0.dev7-py2.6.egg/grafana_alerts/init.py",
line 12, in main
return the_launcher.launch()
File
"/usr/lib/python2.6/site-packages/grafana_alerts-1.0.0.dev7-py2.6.egg/grafana_alerts/launcher.py",
line 16, in launch
alert_checker.check()
File
"/usr/lib/python2.6/site-packages/grafana_alerts-1.0.0.dev7-py2.6.egg/grafana_alerts/alerting.py",
line 50, in check
alert_checker.check()
File
"/usr/lib/python2.6/site-packages/grafana_alerts-1.0.0.dev7-py2.6.egg/grafana_alerts/alerting.py",
line 100, in check
target = grafana_target['target']
KeyError: 'target'

Am 27.07.2015 um 23:28 schrieb pabloa:

Hello Flyersa.

Please update and try again. Version grafana_alerts 1.0.0.dev7 should
solve the issue.

Let me go how it goes.

Pablo


Reply to this email directly or view it on GitHub
#7 (comment).

Clavain Technologies
Enrico Kern

Heerstraße 366
13593 Berlin

GERMANY

WEB: http://www.clavain.com
TEL: +49 (30) 54818753
FAX: +49 (180) 5233633-548

@neel5snapdeal
Copy link

Hi Flyersa,
I am new to this. When i am running grafanaAlerts, I am getting this output. Please can you help me out. Thanx.

$ grafanaAlerts
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/dist-packages/grafana_alerts/init.py", line 12, in main
return the_launcher.launch()
File "/usr/local/lib/python2.7/dist-packages/grafana_alerts/launcher.py", line 16, in launch
alert_checker.check()
File "/usr/local/lib/python2.7/dist-packages/grafana_alerts/alerting.py", line 38, in check
dashboard_data_list = scanner.obtain_dashboards()
File "/usr/local/lib/python2.7/dist-packages/grafana_alerts/alerting.py", line 157, in obtain_dashboards
contents = urllib2.urlopen(request).read()
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1199, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1138, in do_open
h = http_class(host, timeout=req.timeout) # will parse host:port
File "/usr/lib/python2.7/httplib.py", line 712, in init
(self.host, self.port) = self._get_hostport(host, port)
File "/usr/lib/python2.7/httplib.py", line 754, in _get_hostport
raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: '3000api'

@moandcompany
Copy link

The base URL in your grafana_alerts.cfg file (/etc/grafana_alerts/grafana_alertgs.cfg) needs to end with a forward slash character (/)

@ivan-balandzin
Copy link

Hi guys! When I execute alerts script, I get the next output:

[{"id":37,"title":"qdev-ib11","uri":"db/qdev-ib11","type":"dash-db","tags":["monitored"],"isStarred":false},{"id":77,"title":"qdev-ib12","uri":"db/qdev-ib12","type":"dash-db","tags":["monitored"],"isStarred":false}]
Traceback (most recent call last):
File "/usr/bin/grafanaAlerts", line 11, in
load_entry_point('grafana-alerts==1.0.0.dev7', 'console_scripts', 'grafanaAlerts')()
File "/usr/lib/python2.6/site-packages/grafana_alerts/init.py", line 12, in main
return the_launcher.launch()
File "/usr/lib/python2.6/site-packages/grafana_alerts/launcher.py", line 16, in launch
alert_checker.check()
File "/usr/lib/python2.6/site-packages/grafana_alerts/alerting.py", line 40, in check
for d in dashboard_data_list:
TypeError: 'NoneType' object is not iterable

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

5 participants