Ad Widget

Collapse

Host processes monitoring-graphs LLD

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LuizMeier
    Junior Member
    • Sep 2012
    • 13

    #61
    Hi!

    I'm on Zabbix 2.0.

    I've just imported the .xml like the first post says and just have 1 Discovery Rule, with 9 item prototypes. No graphs were added to the template.

    The scripts are on the Zabbix folder and if I run cscript zabbix_win_process.vbs commit svchost.exe , the zabbix_win_process.saved file is created.

    In the frontend, no information about this template is populated on Latest Data of the host that is on the WIN Processes template.

    All the 8 .pl files are on /etc/cron.hourly. When I run, they return me the following warning:
    CARGOS38:/etc/cron.hourly # perl win_process_all_bytessec_stack.pl
    Can't locate JSON.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.14.2/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.14.2 /usr/lib/perl5/vendor_perl/5.14.2/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.14.2 /usr/lib/perl5/5.14.2/i586-linux-thread-multi /usr/lib/perl5/5.14.2 /usr/lib/perl5/site_perl/5.14.2/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.14.2 /usr/lib/perl5/site_perl .) at win_process_all_bytessec_stack.pl line 2.
    BEGIN failed--compilation aborted at win_process_all_bytessec_stack.pl line 2.
    Edit:Just installed perl-json and the message changed:
    unexpected end of string while parsing JSON string, at character offset 3 (before "olor: #000000; backg...") at win_process_all_bytessec_stack.pl line 62
    Here is the descritive of my zabbix_agentd.win.conf:
    Code:
    # This is a config file for Zabbix Agent (Windows)
    # To get more information about Zabbix, go to http://www.zabbix.com
    
    ############ GENERAL PARAMETERS #################
    
    ### Option: LogFile
    #	Name of log file.
    #	If not set, Windows Event Log is used.
    #
    # Mandatory: no
    # Default:
    # LogFile=
    
    LogFile=c:\zabbix\zabbix_agentd.log
    
    ### Option: LogFileSize
    #	Maximum size of log file in MB.
    #	0 - disable automatic log rotation.
    #
    # Mandatory: no
    # Range: 0-1024
    # Default:
    # LogFileSize=1
    
    ### Option: DebugLevel
    #	Specifies debug level
    #	0 - no debug
    #	1 - critical information
    #	2 - error information
    #	3 - warnings
    #	4 - for debugging (produces lots of information)
    #
    # Mandatory: no
    # Range: 0-4
    # Default:
    # DebugLevel=4
    
    ### Option: SourceIP
    #	Source IP address for outgoing connections.
    #
    # Mandatory: no
    # Default:
    # SourceIP=
    
    ### Option: EnableRemoteCommands
    #	Whether remote commands from Zabbix server are allowed.
    #	0 - not allowed
    #	1 - allowed
    #
    # Mandatory: no
    # Default:
    # EnableRemoteCommands=0
    
    ### Option: LogRemoteCommands
    #	Enable logging of executed shell commands as warnings.
    #	0 - disabled
    #	1 - enabled
    #
    # Mandatory: no
    # Default:
    # LogRemoteCommands=0
    
    ##### Passive checks related
    
    ### Option: Server
    #	List of comma delimited IP addresses (or hostnames) of Zabbix servers.
    #	Incoming connections will be accepted only from the hosts listed here.
    #	No spaces allowed.
    #	If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
    #
    # Mandatory: no
    # Default:
    # Server=
    
    Server=10.0.0.111
    
    ### Option: ListenPort
    #	Agent will listen on this port for connections from the server.
    #
    # Mandatory: no
    # Range: 1024-32767
    # Default:
    ListenPort=10050
    
    ### Option: ListenIP
    #       List of comma delimited IP addresses that the agent should listen on.
    #       First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.
    #
    # Mandatory: no
    # Default:
    ListenIP=0.0.0.0
    
    ### Option: StartAgents
    #	Number of pre-forked instances of zabbix_agentd that process passive checks.
    #	If set to 0, disables passive checks and the agent will not listen on any TCP port.
    #
    # Mandatory: no
    # Range: 0-100
    # Default:
    # StartAgents=3
    
    ##### Active checks related
    
    ### Option: ServerActive
    #	List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks.
    #	If port is not specified, default port is used.
    #	IPv6 addresses must be enclosed in square brackets if port for that host is specified.
    #	If port is not specified, square brackets for IPv6 addresses are optional.
    #	If this parameter is not specified, active checks are disabled.
    #	Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
    #
    # Mandatory: no
    # Default:
    #ServerActive=
    
    ServerActive=10.0.0.111
    
    ### Option: Hostname
    #	Unique, case sensitive hostname.
    #	Required for active checks and must match hostname as configured on the server.
    #	Value is acquired from HostnameItem if undefined.
    #
    # Mandatory: no
    # Default:
    Hostname=pontomt3.cargolift.local
    
    Hostname=Windows host
    
    ### Option: HostnameItem
    #	Item used for generating Hostname if it is undefined.
    #	Ignored if Hostname is defined.
    #
    # Mandatory: no
    # Default:
    HostnameItem=system.hostname
    
    ### Option: RefreshActiveChecks
    #	How often list of active checks is refreshed, in seconds.
    #
    # Mandatory: no
    # Range: 60-3600
    # Default:
    RefreshActiveChecks=120
    
    ### Option: BufferSend
    #	Do not keep data longer than N seconds in buffer.
    #
    # Mandatory: no
    # Range: 1-3600
    # Default:
    # BufferSend=5
    
    ### Option: BufferSize
    #	Maximum number of values in a memory buffer. The agent will send
    #	all collected data to Zabbix server or Proxy if the buffer is full.
    #
    # Mandatory: no
    # Range: 2-65535
    # Default:
    # BufferSize=100
    
    ### Option: MaxLinesPerSecond
    #	Maximum number of new lines the agent will send per second to Zabbix Server
    #	or Proxy processing 'log', 'logrt' and 'eventlog' active checks.
    #	The provided value will be overridden by the parameter 'maxlines',
    #	provided in 'log', 'logrt' or 'eventlog' item keys.
    #
    # Mandatory: no
    # Range: 1-1000
    # Default:
    # MaxLinesPerSecond=100
    
    ############ ADVANCED PARAMETERS #################
    
    ### Option: Alias
    #	Sets an alias for parameter. It can be useful to substitute long and complex parameter name with a smaller and simpler one.
    #	For example, if you wish to retrieve paging file usage in percents from the server,
    #	you may use parameter "perf_counter[\Paging File(_Total)\% Usage]", or you may define an alias by adding the following line to configuration file
    #	Alias = pg_usage:perf_counter[\Paging File(_Total)\% Usage]
    #	After that you can use parameter name "pg_usage" to retrieve the same information.
    #	You can specify as many "Alias" records as you wish.
    #	Aliases cannot be used for parameters defined in "PerfCounter" configuration file records.
    #
    # Mandatory: no
    # Range:
    # Default:
    
    ### Option: Timeout
    #	Spend no more than Timeout seconds on processing
    #
    # Mandatory: no
    # Range: 1-30
    # Default:
    # Timeout=3
    
    ### Option: PerfCounter
    #	Syntax: <parameter_name>,"<perf_counter_path>",<period>
    #	Defines new parameter <parameter_name> which is an average value for system performance counter <perf_counter_path> for the specified time period <period> (in seconds).
    #	For example, if you wish to receive average number of processor interrupts per second for last minute, you can define new parameter "interrupts" as following:
    #	PerfCounter = interrupts,"\Processor(0)\Interrupts/sec",60
    #	Please note double quotes around performance counter path.
    #	Samples for calculating average value will be taken every second.
    #	You may run "typeperf -qx" to get list of all performance counters available in Windows.
    #
    # Mandatory: no
    # Range:
    # Default:
    
    ### Option: Include
    #	You may include individual files in the configuration file.
    #
    # Mandatory: no
    # Default:
    # Include=
    
    # Include=c:\zabbix\zabbix_agentd.userparams.conf
    
    ####### USER-DEFINED MONITORED PARAMETERS #######
    
    ### Option: UnsafeUserParameters
    #	Allow all characters to be passed in arguments to user-defined parameters.
    #	0 - do not allow
    #	1 - allow
    #
    # Mandatory: no
    # Range: 0-1
    # Default:
    # UnsafeUserParameters=0
    
    ### Option: UserParameter
    #	User-defined parameter to monitor. There can be several user-defined parameters.
    #	Format: UserParameter=<key>,<shell command>
    #
    # Mandatory: no
    # Default:
    # UserParameter=
    
    #system discovery
    UserParameter = system.discovery[*],cscript "C:\Zabbix\zabbix_win_system_discovery.vbs" //Nologo "$1"
    #process
    UserParameter = process[*],cscript "C:\Zabbix\zabbix_win_process.vbs" //Nologo "$1" "$2"
    #eventlog query
    UserParameter = eventlog.query[*],cscript "C:\Zabbix\zabbix_win_eventlog.vbs" //Nologo "$1" "$2"
    # allow weird chars in userparameters arguments
    UnsafeUserParameters=1
    My Zabbix server has the 10.0.0.111 address and the host has the 10.0.1.147.
    Last edited by LuizMeier; 19-12-2012, 23:05.

    Comment

    • tchjts1
      Senior Member
      • May 2008
      • 1605

      #62
      Not sure that this is helping, but you have Hostname=xxx twice in your agent config.

      Code:
      Hostname=pontomt3.cargolift.local
      
      Hostname=Windows host
      Last edited by tchjts1; 20-12-2012, 16:48.

      Comment

      • LuizMeier
        Junior Member
        • Sep 2012
        • 13

        #63
        Originally posted by tchjts1
        Not sure that this is helping, but you have Hostname=xxx twice in your agent config.

        Code:
        Hostname=pontomt3.cargolift.local
        
        Hostname=Windows host
        Thanks for the answer. Information changes to only Windows host. But no changes at all. Still no graph and still no latest data of the items.

        The item WIN Eventlog has 2 items and Windows Processes has no item. Is that normal?

        Comment

        • ctreppish
          Junior Member
          • Aug 2012
          • 7

          #64
          Originally posted by mmarkwitzz
          Zabbix 2 has some issues with import/export on php 5.1.6. My export is made with zabbix 2.0.1 and php 5.3. Try updating your installation, download the zip again and try import again. It may also work with php 5.2.x.

          You should have a discovery rule with item prototypes and trigger prototypes. No normal items. When the discovery rule is executed, the agent sends the json and discovered items are created in your host for each process.
          The pl script just creates a graph with the discovered items. No doscovery = no items = no graph.
          I have a discovery rule with Item prototypes but do not have Trigger prototypes. Should I infact have Trigger prototypes for it to work?

          Comment

          • LuizMeier
            Junior Member
            • Sep 2012
            • 13

            #65
            Originally posted by ctreppish
            I have a discovery rule with Item prototypes but do not have Trigger prototypes. Should I infact have Trigger prototypes for it to work?
            Same case Here.

            Comment

            • LuizMeier
              Junior Member
              • Sep 2012
              • 13

              #66
              Originally posted by ctreppish
              I have a discovery rule with Item prototypes but do not have Trigger prototypes. Should I infact have Trigger prototypes for it to work?
              Same case Here.

              I'm on 5.3.8 PHP version.

              On Zabbix frontend it says me 2.0 version. At the logon screen on Putty it says me "This is the Zabbix appliance, based on Zabbix 2.0.2."

              Weird.

              Comment

              • ctreppish
                Junior Member
                • Aug 2012
                • 7

                #67
                Originally posted by LuizMeier
                Same case Here.

                I'm on 5.3.8 PHP version.

                On Zabbix frontend it says me 2.0 version. At the logon screen on Putty it says me "This is the Zabbix appliance, based on Zabbix 2.0.2."

                Weird.
                I finally got mine to work. What I found is that the hostname in the agent config file needs to match the name from the Name Column from the web front end.....Configuration-Hosts

                Once I had them identical data started processing and appearing in latest data.

                I'm using the zabbix appliance 2.0.3
                Last edited by ctreppish; 21-12-2012, 22:10. Reason: Add info

                Comment

                • djizno
                  Junior Member
                  • Feb 2013
                  • 2

                  #68
                  Error sometimes in

                  Hi,

                  Sometimes got an error:
                  "item process[commit,mmc.exe]] became not supported: Received value [C:\Program Files\Zabbix agent\zabbix_win_process.vbs(575, 4) Erreur d'exécution Microsoft VBScript: Division par zero"

                  The line causing problem:
                  DatasBulk(SAVDATA_VALUE) = FormatFloat((CDbl(nReadValue1) - CDbl(nReadValue0)) / ((CDbl(nTimestamp1) - CDbl(nTimestamp0)) / CDbl(nFrequency)))

                  Can you help ?
                  Regards

                  Comment

                  • ctreppish
                    Junior Member
                    • Aug 2012
                    • 7

                    #69
                    I'm sorry, I don't have any idea.

                    Comment

                    • LuizMeier
                      Junior Member
                      • Sep 2012
                      • 13

                      #70
                      Hi,

                      Just started with this task again. After too many other projetcs, I can now give some atention to this.

                      I've readed the topic all over again, and did almost all the procedures given by the friends. What I didn't do yet is the edit of the "C20ImportFormatter.php". Think this is the last choice.

                      The agentd.log is giving me now the error that the active check cannot connect with the Zabbix server, as is shown below:

                      Get active checks error: cannot connect to [[10.0.0.111]:10051]
                      This is a strange information, once i have host firewall down, no firewalls between host and Zabbix Server. Besided that, if i run "netstat -an | grep "1005*", ir shows me the 10051 port LISTENNING.

                      In the template, still get just 1 Discovery Rule with 9 Item Prototypes. and no information on Latest Data.

                      Some help?

                      Comment

                      • hadida
                        Junior Member
                        • Feb 2013
                        • 4

                        #71
                        HI

                        I am trying to build graph by pl scripts I have got error.
                        Have any idea how to fix it?

                        Server Ubuntu 12.04, Zabbix 2.0.5

                        ITEM: WIN Process "spiceworks.exe" memory bytes committed (62074)
                        ITEM: WIN Process "svchost.exe" memory bytes committed (62075)
                        ITEM: WIN Process "WmiPrvSE.exe" memory bytes committed (62081)
                        '"' expected, at character offset 1 (before "background-color:#ff...") at ./win_
                        process_all_commit_stack.pl line 320.

                        Comment

                        • rickp297
                          Junior Member
                          • Nov 2011
                          • 6

                          #72
                          what have I done wrong

                          run any of the .pl on my server and get JSON text must be an object or array (but found number, string, true, false or null, use allow_nonref to allow this at ./win_process_all_handles_stack.pl line 62

                          me bad can not read http:// was wrong in .pl I missed the actual location of the api

                          in my defence I am dyslexic
                          Last edited by rickp297; 12-08-2013, 16:17.

                          Comment

                          • Patjomkin
                            Member
                            • Nov 2012
                            • 50

                            #73
                            May be does somebody have settings for linux servers?

                            Comment

                            • neo32
                              Senior Member
                              • Nov 2013
                              • 149

                              #74
                              Originally posted by rickp297
                              run any of the .pl on my server and get JSON text must be an object or array (but found number, string, true, false or null, use allow_nonref to allow this at ./win_process_all_handles_stack.pl line 62

                              me bad can not read http:// was wrong in .pl I missed the actual location of the api

                              in my defence I am dyslexic
                              I also sign this, anybody answer us please, how we can solution this problem ?

                              Comment

                              • Lennyroquai
                                Junior Member
                                • Aug 2014
                                • 8

                                #75
                                Hi Everyone,

                                Hi just discovered this thread, and i'm trying to make it work with my infrastructure but without success.

                                Does someone know if this is still working with 2.2.4 ? or if something new and similar exist ?

                                Currently, my issue is that i can't see anything on the server, and it seems that my windows agent isn't sending anything about Win Processes (but i receive other items.)

                                Thanks

                                Comment

                                Working...