radiorabe / rabe-zabbix

Collection of various Zabbix templates and helper scripts created or used by Radio Bern RaBe
https://radiorabe.github.io/rabe-zabbix/
GNU Affero General Public License v3.0
105 stars 61 forks source link

Value should be a JSON object #43

Closed squarejester closed 6 years ago

squarejester commented 6 years ago

When using your script in Zabbix 3.4 it gets the following error: Value should be a JSON object." I don't think the output of your script produces a properly JSON formatted output anymore with the changes in LLD rules now in Zabbix 3.4. This seems to be an issue now with all your scripts, not just this one.

Could you check?

value should be a json object

paraenggu commented 6 years ago

Hi @squarejester, all our Zabbix templates and scripts were developed and tested against the current Zabbix LTS version (3.0). I haven't had the chance to test them against a newer version.

I don't think the output of your script produces a properly JSON formatted output anymore with the changes in LLD rules now in Zabbix 3.4.

Do you have a reference to a detailed description of the mentioned LLD change?

Are the required IPMI macros ({$HOST.IPMI.CONN}, {$HOST.IPMI.USER}, {$HOST.IPMI.PASS}) configured properly?

Could you please manually execute the ipmi-sensor-discovery.sh script under the same user which runs your Zabbix server/proxy (most likely zabbix) and post the output? Also have a look at the Zabbix and audit (SELinux) logs. The Sensor Discovery - Commands for debugging might also help.

squarejester commented 6 years ago

https://www.zabbix.com/documentation/3.4/manual/discovery/low_level_discovery

Yes, I had the MACROS set. Looks like it bombing out before the script ever runs…..

I ran the script locally on the zabbix server and it says:

Line 7: syntax error near unexpected token ‘newline’

Line 7: ‘(DOCTYPE html)’

From: Christian Affolter [mailto:notifications@github.com] Sent: Tuesday, April 03, 2018 2:36 PM To: radiorabe/rabe-zabbix rabe-zabbix@noreply.github.com Cc: squarejester seanbolding@gmail.com; Mention mention@noreply.github.com Subject: Re: [radiorabe/rabe-zabbix] Value should be a JSON object (#43)

Hi @squarejester https://github.com/squarejester , all our Zabbix templates and scripts were developed and tested against the current Zabbix LTS version (3.0). I haven't had the chance to test them against a newer version.

I don't think the output of your script produces a properly JSON formatted output anymore with the changes in LLD rules now in Zabbix 3.4.

Do you have a reference to a detailed description of the mentioned LLD change?

Are the required IPMI macros ({$HOST.IPMI.CONN}, {$HOST.IPMI.USER}, {$HOST.IPMI.PASS}) configured properly?

Could you please manually execute the ipmi-sensor-discovery.sh script under the same user which runs your Zabbix server/proxy (most likely zabbix) and post the output? Also have a look at the Zabbix and audit (SELinux) logs. The Sensor Discovery - Commands for debugging https://github.com/radiorabe/rabe-zabbix/tree/master/ipmi/Sensor_Discovery#commands-for-debugging might also help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/radiorabe/rabe-zabbix/issues/43#issuecomment-378352707 , or mute the thread https://github.com/notifications/unsubscribe-auth/Ag3U49FjQjnuhm9n3EchKAhnC9eUi8Ivks5tk8EkgaJpZM4TFcl- . https://github.com/notifications/beacon/Ag3U45qjmiT4-AHroDR1ciAa9BbDn1MNks5tk8EkgaJpZM4TFcl-.gif

squarejester commented 6 years ago

Also, not running SELinux

From: Christian Affolter [mailto:notifications@github.com] Sent: Tuesday, April 03, 2018 2:36 PM To: radiorabe/rabe-zabbix rabe-zabbix@noreply.github.com Cc: squarejester seanbolding@gmail.com; Mention mention@noreply.github.com Subject: Re: [radiorabe/rabe-zabbix] Value should be a JSON object (#43)

Hi @squarejester https://github.com/squarejester , all our Zabbix templates and scripts were developed and tested against the current Zabbix LTS version (3.0). I haven't had the chance to test them against a newer version.

I don't think the output of your script produces a properly JSON formatted output anymore with the changes in LLD rules now in Zabbix 3.4.

Do you have a reference to a detailed description of the mentioned LLD change?

Are the required IPMI macros ({$HOST.IPMI.CONN}, {$HOST.IPMI.USER}, {$HOST.IPMI.PASS}) configured properly?

Could you please manually execute the ipmi-sensor-discovery.sh script under the same user which runs your Zabbix server/proxy (most likely zabbix) and post the output? Also have a look at the Zabbix and audit (SELinux) logs. The Sensor Discovery - Commands for debugging https://github.com/radiorabe/rabe-zabbix/tree/master/ipmi/Sensor_Discovery#commands-for-debugging might also help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/radiorabe/rabe-zabbix/issues/43#issuecomment-378352707 , or mute the thread https://github.com/notifications/unsubscribe-auth/Ag3U49FjQjnuhm9n3EchKAhnC9eUi8Ivks5tk8EkgaJpZM4TFcl- . https://github.com/notifications/beacon/Ag3U45qjmiT4-AHroDR1ciAa9BbDn1MNks5tk8EkgaJpZM4TFcl-.gif

paraenggu commented 6 years ago

I don't think the output of your script produces a properly JSON formatted output anymore with the changes in LLD rules now in Zabbix 3.4.

Do you have a reference to a detailed description of the mentioned LLD change?

https://www.zabbix.com/documentation/3.4/manual/discovery/low_level_discovery

I can't find your mentioned 3.0 -> 3.4 LLD changes within the page linked above, did I miss something?

I ran the script locally on the zabbix server and it says: Line 7: syntax error near unexpected token ‘newline’ Line 7: ‘(DOCTYPE html)’

Whoops, why is there a HTML Doctype in the script? How did you download/install it in the first place? Please re-download/install the script from https://raw.githubusercontent.com/radiorabe/rabe-zabbix/master/ipmi/Sensor_Discovery/scripts/ipmi-sensor-discovery.sh

squarejester commented 6 years ago

I downloaded and replaced the sh script and now it runs but it gets a time out error in zabbix , Timeout while executing a shell script.

I ran it manually and it does come back with

{

“data” : [

]

}

As the only output, no matter what parameters I use.

Fyi, I ran impi-sensor to get the raw output from the server IPMI so I have all the values, but none of them when using your script comes back with any data except what I wrote above.

This is a partial list of what came back from running ipmi-sensor that I used to run the command

Using “SysBrd 3.3V,Voltage”, forward and backward and other Names as well

ipmi-sensor-discovery.sh["{$HOST.IPMI.CONN}","{$HOST.IPMI.USER}","{$HOST.IPMI.PASS}", "Temperature,Fan"]

ID | Name | Type | Reading | Units | Event

1 | SysBrd 3.3V | Voltage | 3.34 | V | 'OK'

2 | SysBrd 5V | Voltage | 5.15 | V | 'OK'

3 | SysBrd 12V | Voltage | 12.14 | V | 'OK'

4 | CMOS Battery | Voltage | 3.13 | V | 'OK'

5 | Avg Power | Current | 210.00 | W | 'OK'

6 | Sys Utilization | Other Units Based Sensor | 7.00 | unspecified | 'OK'

7 | CPU Utilization | Other Units Based Sensor | 5.00 | unspecified | 'OK'

8 | Mem Utilization | Other Units Based Sensor | 0.00 | unspecified | 'OK'

9 | IO Utilization | Other Units Based Sensor | 0.00 | unspecified | 'OK'

10 | PCH Temp | Temperature | 46.00 | C | 'OK'

11 | Ambient Temp | Temperature | 20.00 | C | 'OK'

12 | RS1 RR Amb Temp | Temperature | 28.00 | C | 'OK'

13 | RS2 RR Amb Temp | Temperature | 28.00 | C | 'OK'

14 | MID1 RR Amb Temp | Temperature | 25.00 | C | 'OK'

15 | MID2 RR Amb Temp | Temperature | 25.00 | C | 'OK'

16 | RAID RR Amb Temp | Temperature | 26.00 | C | 'OK'

17 | PSU FR Amb Temp | Temperature | 23.00 | C | 'OK'

18 | Fan 1A Tach | Fan | 8968.00 | RPM | 'OK'

19 | Fan 1B Tach | Fan | N/A | RPM | N/A

20 | Fan 2A Tach | Fan | 8968.00 | RPM | 'OK'

21 | Fan 2B Tach | Fan | N/A | RPM | N/A

22 | Fan 3A Tach | Fan | 8968.00 | RPM | 'OK'

23 | Fan 3B Tach | Fan | N/A | RPM | N/A

24 | Fan 4A Tach | Fan | 8968.00 | RPM | 'OK'

25 | Fan 4B Tach | Fan | N/A | RPM | N/A

26 | Fan 5A Tach | Fan | 8968.00 | RPM | 'OK'

27 | Fan 5B Tach | Fan | N/A | RPM | N/A

28 | Fan 6A Tach | Fan | 8909.00 | RPM | 'OK'

29 | Fan 6B Tach | Fan | N/A | RPM | N/A

30 | Fan Riser1A Tach | Fan | N/A | RPM | N/A

Sean

From: Christian Affolter [mailto:notifications@github.com] Sent: Tuesday, April 03, 2018 3:21 PM To: radiorabe/rabe-zabbix rabe-zabbix@noreply.github.com Cc: squarejester seanbolding@gmail.com; Mention mention@noreply.github.com Subject: Re: [radiorabe/rabe-zabbix] Value should be a JSON object (#43)

I don't think the output of your script produces a properly JSON formatted output anymore with the changes in LLD rules now in Zabbix 3.4.

Do you have a reference to a detailed description of the mentioned LLD change?

https://www.zabbix.com/documentation/3.4/manual/discovery/low_level_discovery

I can't find your mentioned 3.0 -> 3.4 LLD changes within the page linked above, did I miss something?

I ran the script locally on the zabbix server and it says: Line 7: syntax error near unexpected token ‘newline’ Line 7: ‘(DOCTYPE html)’

Whoops, why is there a HTML Doctype in the script? How did you download/install it in the first place? Please re-download/install the script from https://raw.githubusercontent.com/radiorabe/rabe-zabbix/master/ipmi/Sensor_Discovery/scripts/ipmi-sensor-discovery.sh

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/radiorabe/rabe-zabbix/issues/43#issuecomment-378366165 , or mute the thread https://github.com/notifications/unsubscribe-auth/Ag3U41tmCX33ZFuPBqFqPGOgrZjR6C02ks5tk8ungaJpZM4TFcl- . https://github.com/notifications/beacon/Ag3U47w18q11TZq_P00dTJukChQ6E8hmks5tk8ungaJpZM4TFcl-.gif

paraenggu commented 6 years ago

Please post the complete invocation of the script (including the parameters) and the working ipmi-sensors command (you might want to obfuscate the host's address and password, if required).

hairmare commented 6 years ago

I'm closing this since it doesn't seem to describe an actual bug and the click-raw-to-download issue has been well documented in the new app readmes.