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

Error while sending message or call to target #669

Closed
mohammad-sajid opened this issue Feb 13, 2022 · 4 comments
Closed

Error while sending message or call to target #669

mohammad-sajid opened this issue Feb 13, 2022 · 4 comments

Comments

@mohammad-sajid
Copy link

mohammad-sajid commented Feb 13, 2022

While sending a call r message to target am getting the below error.
As verified in the target table the details were there and the mode was also proper for that target. but still getting the error.

2022-02-14 11:47:58,074 ERROR iris.sender.shared failed modifying nonexistent metric: ‘plivocall_cnt’
Traceback (most recent call last):
 File “sender.py”, line 1292, in fetch_and_send_message
   success, sent_locally = distributed_send_message(message, vendor_manager)
 File “sender.py”, line 1182, in distributed_send_message
   runtime = vendor_manager.send_message(message)
 File “/usr/local/lib/python3.8/dist-packages/iris/vendors/init.py”, line 61, in send_message
   for tries, vendor in enumerate(self.app_specific_vendors_iter.get(message.get(‘application’), self.vendors_iter)[message[‘mode’]]):
KeyError: ‘plivocall’
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
 File “/usr/local/lib/python3.8/dist-packages/iris/sender/shared.py”, line 15, in add_mode_stat
   stats[mode + ‘_cnt’] += 1
KeyError: ‘plivocall_cnt’
2022-02-14 11:47:58,075 ERROR root reclassifying as email

below are the target_contact & mode details.

mode
+----+-----------+
| id | name |
+----+-----------+
| 26 | call |
| 36 | drop |
| 35 | email |
| 37 | plivocall |
| 17 | slack |
| 8 | sms |
+----+-----------+

target_contact
+-----------+---------+-------------------------------+
| target_id | mode_id | destination |
+-----------+---------+-------------------------------+
| 348 | 8 | +91 95057 XXXXX |
| 348 | 17 | sajid |
| 348 | 26 | +91 95057 XXXXX |
| 348 | 35 | mdsajid@test.com |
| 348 | 37 | +91 95057 XXXXX |
+-----------+---------+-------------------------------+

@diegocepedaw
Copy link
Collaborator

diegocepedaw commented Feb 15, 2022

@mohammad-sajid does the application you are trying to send a message with have this plivocall mode enabled? You can check via the application page in the UI or the db. It should be checked in the "supported modes" section

Screen Shot 2022-02-15 at 7 34 23 AM

@mohammad-sajid
Copy link
Author

@diegocepedaw Yes it's there in the applications and also in DB.
image

@mohammad-sajid
Copy link
Author

@diegocepedaw getting You are receiving this as you created this plan and we can’t resolve oncall-primary of NOC-Team at this time. error.

Also, i can see in body priority passing as low while testing it from Plan directly.

can you please help here?

{‘body’: “You are receiving this as you created this plan and we can’t resolve oncall-primary of NOC-Team at this time.\n\n”, ‘message_id’: 50, ‘target’: ‘admin’, ‘priority’: ‘low’, ‘priority_id’: 35, ‘application’: ‘oncall-stg’, ‘plan’: ‘nagios-freshdesk-service-plan’, ‘plan_id’: 66, ‘incident_id’: 533326, ‘context’: {‘test’: None, ‘iris’: {‘body’: “You are receiving this as you created this plan and we can’t resolve oncall-primary of NOC-Team at this time.\n\n”, ‘message_id’: 50, ‘target’: ‘admin’, ‘priority’: ‘low’, ‘priority_id’: 35, ‘application’: ‘oncall-stg’, ‘plan’: ‘nagios-freshdesk-service-plan’, ‘plan_id’: 66, ‘incident_id’: 533326, ‘incident_created’: datetime.datetime(2022, 3, 15, 5, 55, 49), ‘template’:‘nagios-freshdesk-service-template’, ‘dynamic_target’: None}}, ‘incident_created’: datetime.datetime(2022, 3, 15, 5, 55, 49), ‘template’: ‘nagios-freshdesk-service-template’, ‘dynamic_target’: None}

image

@allwyn-pradip
Copy link
Contributor

@mohammad-sajid pls close this as the issue is resolved using #690

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

3 participants