I am sending alerts from AlertManager to Stackstorm. The alert is being received by Stackstorm as confirmed from
I am getting the error "OverflowError: MongoDB can only handle up to 8-byte ints" in st2rulesengine.log and stackstorm is not triggering the action. The reason is found is the "groupKey" value.
If I manually change the groupKey value to lower or convert it into String and then post it to the Stackstorm, then everything is fine and Stackstorm triggers the action
INFO hooks [-] 71478fb6-d83f-476e-9a88-530a7ee26f40 - POST /v1/webhooks/sample result={"status": "resolved", "groupLabels": {}, "
groupKey": 14695981039346656037, "commonAnnotations": {}, "alerts": [{"status": "resolved", "labels": {"name": "st2", "alertname": "testalert23"}, "endsAt": "2017-04-25T04:14:31.232413895-07:00", "generatorURL": "", "startsAt": "2017-04-25T04:14:26.232413895-07:00", "annotations": {}}], "version": "3", "receiver": "slack_g", "externalURL": "
http://ubuntu:9093", "commonLabels": {"name": "st2", "alertname": "testalert23"}} (result='{"status": "resolved", "groupLabels": {}, "groupKey": 14695981039346656037, "commonAnnotations": {}, "alerts": [{"status": "resolved", "labels": {"name": "st2", "alertname": "testalert23"}, "endsAt": "2017-04-25T04:14:31.232413895-07:00", "generatorURL": "", "startsAt": "2017-04-25T04:14:26.232413895-07:00", "annotations": {}}], "version": "3", "receiver": "slack_g", "externalURL": "
http://ubuntu:9093", "commonLabels": {"name": "st2", "alertname": "testalert23"}}',request_id='71478fb6-d83f-476e-9a88-530a7ee26f40',status_code='202 Accepted',remote_addr='127.0.0.1',path='/v1/webhooks/sample',method='POST')
Traceback (most recent call last):
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/transport/consumers.py", line 85, in process
response = self._handler.pre_ack_process(body)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2reactor/rules/worker.py", line 56, in pre_ack_process
raise_on_no_trigger=True)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2reactor/container/utils.py", line 80, in create_trigger_instance
return TriggerInstance.add_or_update(trigger_instance)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/persistence/base.py", line 173, in add_or_update
model_object = cls._get_impl().add_or_update(model_object)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/models/db/__init__.py", line 313, in add_or_update
instance.save()
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/mongoengine/document.py", line 340, in save
object_id = collection.save(doc, **write_concern)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/collection.py", line 2445, in save
check_keys, manipulate, write_concern)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/collection.py", line 562, in _insert
check_keys, manipulate, write_concern, op_id, bypass_doc_val)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/collection.py", line 543, in _insert_one
check_keys=check_keys)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/pool.py", line 424, in command
self._raise_connection_failure(error)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/pool.py", line 552, in _raise_connection_failure
raise error
OverflowError: MongoDB can only handle up to 8-byte ints