Advertisement
mitzli

problem

Sep 8th, 2017
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. root@zabbix:/usr/lib/zabbix/alertscripts# ./zbxtg.py MzL_7 test 1 --debug zbxtg.py: {u'ok': True, u'result': {u'username': u'zabb1xbot', u'first_name': u'zabbix', u'is_bot': True, u'id': 422917405}}
  2. zbxtg.py: Cache file with uids: /tmp/zbxtg/uids.txt
  3. zbxtg.py: Telegram uid of private 'MzL_7': 172028281
  4.  
  5. zbxtg.py: Trying to /sendMessage:
  6. zbxtg.py: https://api.telegram.org/bot422917405:AAGzxFZD9vhfbBm64qCZ4iwoGPVsgHsk6bU/sendMessage
  7. zbxtg.py: post params: {'text': 'test\n1', 'disable_notification': False, 'chat_id': '172028281\n', 'disable_web_page_preview': False}
  8.  
  9. root@zabbix:/usr/lib/zabbix/alertscripts# curl -sI http://172.18.0.190/zabbix/chart.php | head -1
  10. HTTP/1.1 200 OK
  11.  
  12. root@zabbix:/usr/lib/zabbix/alertscripts# ./zbxtg.py MzL_7 test "$(echo -e 'zbxtg;graphs: \nzbxtg;graphs_period=3600\nzbxtg;itemid:648\nzbxtg;title:ololo')"
  13. Traceback (most recent call last):
  14. File "./zbxtg.py", line 458, in <module>
  15. main()
  16. File "./zbxtg.py", line 428, in main
  17. zbx.login()
  18. File "./zbxtg.py", line 163, in login
  19. requests.packages.urllib3.disable_warnings()
  20. AttributeError: 'module' object has no attribute 'packages'
  21.  
  22. root@zabbix:/usr/lib/zabbix/alertscripts# sudo -u zabbix grep -E 'zbx_(server|api)' ./zbxtg_settings.py
  23. zbx_server = "http://172.18.0.190/zabbix/" # zabbix server full url
  24. zbx_api_user = "Admin"
  25. zbx_api_pass = "zabbix"
  26. zbx_api_verify = False #True
  27. root@zabbix:/usr/lib/zabbix/alertscripts#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement