Ad Widget

Collapse

Host processes monitoring-graphs LLD

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #31
    Originally posted by MrSol
    This is awesome addon! Works on 2.0.2rc1. *.pl scripts took me couple days of TSing though. The issues was in WIN format of files, if they aren't converted properly to UNIX unpredicted results may happen. Be aware. Thanks.
    What was it that you did to convert the files, exactly? I have all the data under "Latest Data", but I am not getting any graphs generated.

    Comment

    • mmarkwitzz
      Senior Member
      • Jan 2011
      • 106

      #32
      Originally posted by tchjts1
      What was it that you did to convert the files, exactly? I have all the data under "Latest Data", but I am not getting any graphs generated.
      I think you can use dos2unix command (eg. dos2unix script.pl)

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #33
        Originally posted by mmarkwitzz
        I think you can use dos2unix command (eg. dos2unix script.pl)
        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

        • MrSol
          Junior Member
          • Jul 2012
          • 7

          #34
          Originally posted by tchjts1
          What was it that you did to convert the files, exactly? I have all the data under "Latest Data", but I am not getting any graphs generated.
          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

          • ehermouet
            Member
            • May 2011
            • 50

            #35
            Hi,

            for me this work only on 1 computer. on other items are not present but agent show all process when i do it manualy with cscript

            do you know why?

            Comment

            • mmarkwitzz
              Senior Member
              • Jan 2011
              • 106

              #36
              Originally posted by tchjts1
              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
              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)

              Comment

              • mmarkwitzz
                Senior Member
                • Jan 2011
                • 106

                #37
                Originally posted by MrSol
                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!
                This is my fault, the script does no error checking at all.

                Comment

                • mmarkwitzz
                  Senior Member
                  • Jan 2011
                  • 106

                  #38
                  Originally posted by ehermouet
                  Hi,

                  for me this work only on 1 computer. on other items are not present but agent show all process when i do it manualy with cscript

                  do you know why?
                  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

                  • tchjts1
                    Senior Member
                    • May 2008
                    • 1605

                    #39
                    Originally posted by mmarkwitzz
                    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)
                    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

                    • ehermouet
                      Member
                      • May 2011
                      • 50

                      #40
                      Originally posted by mmarkwitzz
                      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.
                      hi

                      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=1

                      Comment

                      • ehermouet
                        Member
                        • May 2011
                        • 50

                        #41
                        Originally posted by tchjts1
                        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?
                        me too i have this problem before... it's because it was wrong url (in my case).

                        Comment

                        • ehermouet
                          Member
                          • May 2011
                          • 50

                          #42
                          i found why,

                          it's work on agent 1.8.3 but not 2.0.0. do you know why?

                          Comment

                          • mmarkwitzz
                            Senior Member
                            • Jan 2011
                            • 106

                            #43
                            Originally posted by ehermouet
                            i found why,

                            it's work on agent 1.8.3 but not 2.0.0. do you know why?
                            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

                            • mmarkwitzz
                              Senior Member
                              • Jan 2011
                              • 106

                              #44
                              Originally posted by tchjts1
                              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?
                              Try the following changes to one of the scripts and run it manually:
                              • 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

                              • ehermouet
                                Member
                                • May 2011
                                • 50

                                #45
                                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

                                Working...