Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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}}
- zbxtg.py: Cache file with uids: /tmp/zbxtg/uids.txt
- zbxtg.py: Telegram uid of private 'MzL_7': 172028281
- zbxtg.py: Trying to /sendMessage:
- zbxtg.py: https://api.telegram.org/bot422917405:AAGzxFZD9vhfbBm64qCZ4iwoGPVsgHsk6bU/sendMessage
- zbxtg.py: post params: {'text': 'test\n1', 'disable_notification': False, 'chat_id': '172028281\n', 'disable_web_page_preview': False}
- root@zabbix:/usr/lib/zabbix/alertscripts# curl -sI http://172.18.0.190/zabbix/chart.php | head -1
- HTTP/1.1 200 OK
- 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')"
- Traceback (most recent call last):
- File "./zbxtg.py", line 458, in <module>
- main()
- File "./zbxtg.py", line 428, in main
- zbx.login()
- File "./zbxtg.py", line 163, in login
- requests.packages.urllib3.disable_warnings()
- AttributeError: 'module' object has no attribute 'packages'
- root@zabbix:/usr/lib/zabbix/alertscripts# sudo -u zabbix grep -E 'zbx_(server|api)' ./zbxtg_settings.py
- zbx_server = "http://172.18.0.190/zabbix/" # zabbix server full url
- zbx_api_user = "Admin"
- zbx_api_pass = "zabbix"
- zbx_api_verify = False #True
- root@zabbix:/usr/lib/zabbix/alertscripts#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement