Hi, I have installed the pdagent on ubuntu 18.04.04 LTS, integrated with Nagios core and checked that it can send events to pagerduty. Still, when the notify cmd is executed by nagios i am getting this errors:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pdagent/heartbeat.py", line 147, in _process_response
result = json.loads(response_str)
File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
2020-07-31 15:02:59,728 WARNING HeartbeatTask pdagent.heartbeat Error reading heartbeat response data:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pdagent/heartbeat.py", line 147, in _process_response
result = json.loads(response_str)
File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
2020-07-31 16:02:59,731 WARNING HeartbeatTask pdagent.heartbeat Error reading heartbeat response data:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pdagent/heartbeat.py", line 147, in _process_response
result = json.loads(response_str)
File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
2020-07-31 16:55:50,559 INFO SendEventTask pdagent.pdqueue Processing event 1596214541429434_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.txt
2020-07-31 16:55:51,144 WARNING SendEventTask pdagent.sendevent Error reading response data while sending event:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pdagent/sendevent.py", line 133, in send_event
result = json.loads(result_str)
File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
2020-07-31 16:55:51,145 ERROR SendEventTask pdagent.sendevent Error sending event 1596214541429434_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.txt; Error code: 200, Reason: b'{"status":"success","message":"Event processed","incident_key":"server.fire"}'
2020-07-31 16:55:51,145 INFO SendEventTask pdagent.pdqueue Changing 1596214541429434_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.txt type: pdq -> suc...
2020-07-31 17:02:59,731 WARNING HeartbeatTask pdagent.heartbeat Error reading heartbeat response data:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pdagent/heartbeat.py", line 147, in _process_response
result = json.loads(response_str)
File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'