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

Value should be a json object #5

Open
avkopylov opened this issue Sep 28, 2018 · 5 comments
Open

Value should be a json object #5

avkopylov opened this issue Sep 28, 2018 · 5 comments

Comments

@avkopylov
Copy link

Hi Ike,

Trying to configure zaws plugin in zabbix 3.4, but get 'Value should be a json object' on 'Discovery rules' page. Could you help to find and solve the root cause? Thanks!
screen shot 2018-09-28 at 06 29 21

@navrik
Copy link

navrik commented Nov 9, 2018

Zabbix 4.0 and I have the same issue.

@lminan
Copy link

lminan commented Nov 11, 2018

Same problem here.
Have anyone solve this?.

@ike-dai
Copy link
Owner

ike-dai commented Nov 19, 2018

Sorry for late reply.
In my Zabbix 4.0 environment, zaws script has be executed correctly.

Please check the zaws output by executing zaws command directly.

zaws ec2 list -r <your region name> -k <your aws access key id> -s <your aws secret key>

Possible cause:

  • invalid region name or access key id or secret key id
  • AWS API network connection error
  • Time synchronization error in Zabbix server

@navrik
Copy link

navrik commented Nov 19, 2018

Checked again.
ubuntu@ip-10-10-10-187:/usr/lib/zabbix/externalscripts$ zabbix_server --version
zabbix_server (Zabbix) 4.0.1
Revision 86073 29 October 2018, compilation time: Oct 29 2018 17:49:36

This script is working properly from console:
ubuntu@ip-10-10-10-187:/usr/lib/zabbix/externalscripts$ sudo ./zaws-linux-amd64 "ec2" "list" "-r=us-east-1" "-k=mykey" "-s=mysecretkey"
So the result is a big output in console with right aws names, IP addresses etc, like this (this is just a part part):
{
"data": [{
"{#INSTANCE.NAME}": "AWS Instance Name",
"{#INSTANCE.TYPE}": "t2.micro",
"{#INSTANCE.ID}": "i-AWSID",
"{#INSTANCE.PRIVATE.ADDR}": "10.10.10.59"
}, {
"{#INSTANCE.NAME}": "AWS Instance Name 2",
"{#INSTANCE.TYPE}": "t2.large",
"{#INSTANCE.ID}": "i-AWSID",
"{#INSTANCE.PRIVATE.ADDR}": "10.100.102.47"
}]
}
When I'm checking this output with any online JSON validator, for example https://jsonlint.com/ - I'm getting "Valid JSON" result.
But issue as mentioned before that I'm getting 'Value should be a JSON object' on 'Discovery rules' page.
There is no AWS API connection errors.

Thanks.

@ike-dai
Copy link
Owner

ike-dai commented Nov 20, 2018

Thanks!
I checked your response json.
I think your json format is valid.
This command can be executed by Zabbix process user?

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

4 participants