Ad Widget
Collapse
Host processes monitoring-graphs LLD
Collapse
X
-
Comment
-
Tried that. here is the error I am seeing when I try to run any of the scripts manually..
Code:# ./win_process_all_bytessec_stack.pl malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at ./win_process_all_bytessec_stack.pl line 62
Comment
-
First, when I got JSON string error:
-I modified url in *.pl scripts from http://127.0.0.1/api_jsonrpc.php to http://127.0.0.1/zabbix/api_jsonrpc.php.
Scripts gave no error, but output was blank and no graphs were created.
Then I used dos2unix from cygwin suite to convert (suggested in this thread).
This helped.
I'm using Zabbix 2.0 Appliance updated to 2.0.2rc1.
Good luck!Comment
-
Check your URL, username and password are correct. Also make sure the user you are using has API privileges (you can see this in the frontend, in Administration->Users if I remember correctly)Tried that. here is the error I am seeing when I try to run any of the scripts manually..
Code:# ./win_process_all_bytessec_stack.pl malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at ./win_process_all_bytessec_stack.pl line 62
Comment
-
This is my fault, the script does no error checking at all.First, when I got JSON string error:
-I modified url in *.pl scripts from http://127.0.0.1/api_jsonrpc.php to http://127.0.0.1/zabbix/api_jsonrpc.php.
Scripts gave no error, but output was blank and no graphs were created.
Then I used dos2unix from cygwin suite to convert (suggested in this thread).
This helped.
I'm using Zabbix 2.0 Appliance updated to 2.0.2rc1.
Good luck!Comment
-
1) Can you see the items in your frontend (either in the host or latest data)?
2) Do you see a discovery rule in your imported template?
If no discovery rule, try updating to zabbix 2.0.2rc1 or later and re-import the template. This should fix issue 1)
If you have items in the frontend but the script does not create any graphs, verify the URL, username and password in your script. If the script returns _nothing_ then it's either a URL or pass/user issue.
EDIT: If the 1 computer that works and the others are using the same zabbix server and template, try checking the .conf file on the computers that don't work to see if _active_ checks are enabled and working.Comment
-
In 2.0 and later, they have removed the category "API Access" from user groups. All users have access to the API.
5.5.8 API access changes
User group access property “API access” has been removed. Starting with Zabbix 2.0, all users have full access to the API.
Username and PW are correct. I have modified the URL as appropriate (Which I did have wrong), and ran the dos2unix conversion on the scripts.
I still get that same JSON error as above.
malformed JSON string, neither array, <snip>
I am beginning to think the error is coming from the version of Perl-JSON that I have installed on my RHEL6 system.
Anyone else using RedHat here that has this installed and working?Comment
-
hi1) Can you see the items in your frontend (either in the host or latest data)?
2) Do you see a discovery rule in your imported template?
If no discovery rule, try updating to zabbix 2.0.2rc1 or later and re-import the template. This should fix issue 1)
If you have items in the frontend but the script does not create any graphs, verify the URL, username and password in your script. If the script returns _nothing_ then it's either a URL or pass/user issue.
EDIT: If the 1 computer that works and the others are using the same zabbix server and template, try checking the .conf file on the computers that don't work to see if _active_ checks are enabled and working.
here my agent config
Server=192.168.1.26
ListenPort=10050
Hostname=SPEXCHANGE
UserParameter=windows.services,"C:\services.exe"
#system discovery
UserParameter = system.discovery[*],cscript "C:\zabbix_win_system_discovery.vbs" //Nologo "$1"
#process
UserParameter = process[*],cscript "C:\zabbix_win_process.vbs" //Nologo "$1" "$2"
#eventlog query
UserParameter = eventlog.query[*],cscript "C:\zabbix_win_eventlog.vbs" //Nologo "$1" "$2"
# allow weird chars in userparameters arguments
UnsafeUserParameters=1Comment
-
me too i have this problem before... it's because it was wrong url (in my case).In 2.0 and later, they have removed the category "API Access" from user groups. All users have access to the API.
5.5.8 API access changes
User group access property “API access” has been removed. Starting with Zabbix 2.0, all users have full access to the API.
Username and PW are correct. I have modified the URL as appropriate (Which I did have wrong), and ran the dos2unix conversion on the scripts.
I still get that same JSON error as above.
malformed JSON string, neither array, <snip>
I am beginning to think the error is coming from the version of Perl-JSON that I have installed on my RHEL6 system.
Anyone else using RedHat here that has this installed and working?Comment
-
Zabbix 2.0 agent changed the parameters in the config a little but. You should have something like ServerActive which specified to which server the agent should connect for active checks (where zabbix 1.8.x uses the same Server parameters)
Check the documentation to be sure.
Also, I fail to see how it works with agent 1.8.x as the agent itself has never heard of discovery rules..Comment
-
Try the following changes to one of the scripts and run it manually:In 2.0 and later, they have removed the category "API Access" from user groups. All users have access to the API.
5.5.8 API access changes
User group access property “API access” has been removed. Starting with Zabbix 2.0, all users have full access to the API.
Username and PW are correct. I have modified the URL as appropriate (Which I did have wrong), and ran the dos2unix conversion on the scripts.
I still get that same JSON error as above.
malformed JSON string, neither array, <snip>
I am beginning to think the error is coming from the version of Perl-JSON that I have installed on my RHEL6 system.
Anyone else using RedHat here that has this installed and working?
- After line 42 insert the following line: print $res."\n\n";
The first change will print the output from the cURL command. If there is something wrong with the URL or with the connection it should spit out and error, otherwise it should spit out a json string.
If there is a problem with the password or username, the json should contain some error information.Comment
-
here my log on agent
6112:20120731:161028.011 Active check [eventlog.query[application,(source=Application\sError;id=1000;typ e=Error) | (source=Application\sHang;id=1002;type=Error)]] is not supported. Disabled.
6112:20120731:161028.011 Active check [eventlog.query[oop,oop,,]] is not supported. Disabled.
6112:20120731:161028.011 Active check [eventlog.query[system,(source=Disk;id=11|7;type=Error) | (source=Disk;id=52|51;type=Warning) | (source=Ntfs;id=137|55;type=Error) | (source=Ntfs;id=136|57;type=Warning) | (source=Virtual\sDisk\sService;id=9|8|6|1;type=Err or)]] is not supported. Disabled.
6112:20120731:161028.011 Active check [eventlog.query[system,(source=LMDS;id=3014;type=Error) | (source=LMD;id=2;type=Error) | (source=atapi;id=9;type=Error) | (source=atapi;id=26;type=Warning) | (source=iaStor;id=9;type=Error) | (source=dmio;id=36|5|4;type=Warning)]] is not supported. Disabled.
6112:20120731:161031.074 Active check [system.discovery[disks,]] is not supported. Disabled.
6112:20120731:161034.090 Active check [system.discovery[disks]] is not supported. Disabled.
6112:20120731:161037.105 Active check [system.discovery[processes]] is not supported. Disabled.
6112:20120731:161040.480 Active check [system.uptime[]] is not supported. Disabled.Comment

Comment