zabbix
zabbix copied to clipboard
Zabbix latest data shows jq parse error like below
Zabbix Web Latest data items shows the jq parse error like below: parse error: Invalid numeric literal at line 1, column 31337
but no this error when i execute the mongodb.sh script on the mongo server.
please help me out.
Getting below error while executing mongodb.sh
jq: error: Invalid numeric literal at EOF at line 1, column 7 (while parsing '.27017.') at
Please correct it.
add 2>/dev/null to line 60 of mongodb.sh to fix this problem.
value=$(echo $output | jq $index 2>/dev/null)
I've requested merge request for this.
Thanks for quick response but after adding 2>/dev/null in script zabbix item says Value "" type of "string" not suitable for value type "Numeric (unsigned)"
Please let us know how will it resolve.
Hi , Jq should have these values to work:- jq '.localhost."27017".admin'
Can you help ?
Hi manjeetlakra, the fix I proposed was for this error : "parse error: Invalid numeric literal at line 1, column 31337". for your case, you can add "echo $output" to end of the script and run it manually and check the output.
Your fix is working on command line but in zabbix dashboard it is showing Value "" type of "string" not suitable for value type "Numeric (unsigned)" due to which graphs are not coming. Can you tell me how will this resolve.
Sorry your fix is working. Thanks for support. Appreciated.
add 2>/dev/null to line 60 of mongodb.sh to fix this problem.
value=$(echo $output | jq $index 2>/dev/null)
I've requested merge request for this.
yes, it is resolved as your suggestion. Thanks a lot
Sorry your fix is working. Thanks for support. Appreciated.
I have added above line to mongodb.sh script but still some item showing same error. Could you please suggest the fix?