Skip to content

register_st2_config_to_zabbix.py script failing with Error -32500: Application error #52

@mg1boc1

Description

@mg1boc1

Hello All,

I'm trying to integrate zabbix with stack storm and the integration is failing when i am trying to run the script
/opt/stackstorm/virtualenvs/zabbix/bin/python /opt/stackstorm/packs/zabbix/tools/register_st2_config_to_zabbix.py -z http://.../zabbix -u "Admin" -p "*****"

{code}

Traceback (most recent call last):
  File "/opt/stackstorm/packs/zabbix/tools/register_st2_config_to_zabbix.py", line 193, in <module>
    main()
  File "/opt/stackstorm/packs/zabbix/tools/register_st2_config_to_zabbix.py", line 184, in main
    register_action(client, mediatype_id, options, action_id)
  File "/opt/stackstorm/packs/zabbix/tools/register_st2_config_to_zabbix.py", line 126, in register_action
    "mediatypeid": mediatype_id,
  File "/opt/stackstorm/virtualenvs/zabbix/lib/python3.6/site-packages/pyzabbix/api.py", line 82, in fn
    args or kwargs
  File "/opt/stackstorm/virtualenvs/zabbix/lib/python3.6/site-packages/pyzabbix/api.py", line 250, in do_request
    raise ZabbixAPIException(msg, err['code'])
pyzabbix.api.ZabbixAPIException: ('Error -32500: Application error., SQL statement execution has failed "INSERT INTO opmessage (default_msg,mediatypeid,operationid) VALUES (\'1\',\'6\',\'24\')". while sending {\'jsonrpc\': \'2.0\', \'method\': \'action.create\', \'params\': {\'name\': \'Dispatching to StackStorm\', \'esc_period\': 360, \'eventsource\': 0, \'def_shortdata\': \'{TRIGGER.STATUS}: {TRIGGER.NAME}\', \'def_longdata\': \'{"event": {"id": "{EVENT.ID}", "time": "{EVENT.TIME}"}, "trigger": {"id": "{TRIGGER.ID}", "name": "{TRIGGER.NAME}", "status": "{TRIGGER.STATUS}"}, "items": [{"name": "{ITEM.NAME1}", "host": "{HOST.NAME1}", "key": "{ITEM.KEY1}", "value": "{ITEM.VALUE1}"}, {"name": "{ITEM.NAME2}", "host": "{HOST.NAME2}", "key": "{ITEM.KEY2}", "value": "{ITEM.VALUE2}"}, {"name": "{ITEM.NAME3}", "host": "{HOST.NAME3}", "key": "{ITEM.KEY3}", "value": "{ITEM.VALUE3}"}, {"name": "{ITEM.NAME4}", "host": "{HOST.NAME4}", "key": "{ITEM.KEY4}", "value": "{ITEM.VALUE4}"}, {"name": "{ITEM.NAME5}", "host": "{HOST.NAME5}", "key": "{ITEM.KEY5}", "value": "{ITEM.VALUE5}"}, {"name": "{ITEM.NAME6}", "host": "{HOST.NAME6}", "key": "{ITEM.KEY6}", "value": "{ITEM.VALUE6}"}, {"name": "{ITEM.NAME7}", "host": "{HOST.NAME7}", "key": "{ITEM.KEY7}", "value": "{ITEM.VALUE7}"}, {"name": "{ITEM.NAME8}", "host": "{HOST.NAME8}", "key": "{ITEM.KEY8}", "value": "{ITEM.VALUE8}"}]}\', \'operations\': [{\'operationtype\': 0, \'esc_period\': 0, \'esc_step_from\': 1, \'esc_step_to\': 1, \'evaltype\': 0, \'opmessage_usr\': [{\'userid\': \'1\'}], \'opmessage\': {\'default_msg\': 1, \'mediatypeid\': \'6\'}}]}, \'id\': \'1\', \'auth\': \'9f792f80b082a0e92b1f88c38790ecde\'}', -32500)

{code}

I passed the zabbix login credentials correctly like wise before performing the actions i login to st2ctl from backend node

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions