Hey guys,
I'm trying to monitor my spot instances using Zabbix's discovery rules.
I have a 4.2.0 server set up with a 4.2.0 agent on him.
I tried 2 things:
1. Sending the request directly through the discovery rule, setting it to HTTP agent, as a GET request type, with the correct headers and all.
When enabled, the status of the discovery rule will be set to "Not Supported" with an error "Cannot find the 'data' array in the received JSON object".
2. Setting up a regular item, HTTP Agent and GET request type, to get the text value from the request(tried with Convert to JSON on and off), then set up a discovery rule using dependent item on the master item.
When enabled, the discovery rule returns the same error.
In the documentation, it says:
"Note that since Zabbix 4.2, the format of the JSON returned by low-level discovery rules has been changed. It is no longer expected that the JSON will contain the "data" object. Low-level discovery will now accept a normal JSON containing an array, in order to support new features such as the item value preprocessing and custom paths to low-level discovery macro values in a JSON document."
The response I'm getting when sending this request manually is:
{
"request": {
"id": "111111111111111111",
"url": "/aws/ec2/group",
"method": "GET",
"timestamp": "2019-04-18T09:05:52.129Z"
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"kind": "spotinst:aws:ec2:group",
"items": [
{
"id": "sig-11111111111",
"name": "Text-Text-6-servers",
"description": "Text-6-servers",
"capacity": {
"minimum": 1,
"maximum": 1,
"target": 1,
"unit": "instance"
},
And so on.
Any ideas?
I'm trying to monitor my spot instances using Zabbix's discovery rules.
I have a 4.2.0 server set up with a 4.2.0 agent on him.
I tried 2 things:
1. Sending the request directly through the discovery rule, setting it to HTTP agent, as a GET request type, with the correct headers and all.
When enabled, the status of the discovery rule will be set to "Not Supported" with an error "Cannot find the 'data' array in the received JSON object".
2. Setting up a regular item, HTTP Agent and GET request type, to get the text value from the request(tried with Convert to JSON on and off), then set up a discovery rule using dependent item on the master item.
When enabled, the discovery rule returns the same error.
In the documentation, it says:
"Note that since Zabbix 4.2, the format of the JSON returned by low-level discovery rules has been changed. It is no longer expected that the JSON will contain the "data" object. Low-level discovery will now accept a normal JSON containing an array, in order to support new features such as the item value preprocessing and custom paths to low-level discovery macro values in a JSON document."
The response I'm getting when sending this request manually is:
{
"request": {
"id": "111111111111111111",
"url": "/aws/ec2/group",
"method": "GET",
"timestamp": "2019-04-18T09:05:52.129Z"
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"kind": "spotinst:aws:ec2:group",
"items": [
{
"id": "sig-11111111111",
"name": "Text-Text-6-servers",
"description": "Text-6-servers",
"capacity": {
"minimum": 1,
"maximum": 1,
"target": 1,
"unit": "instance"
},
And so on.
Any ideas?
Comment