Ad Widget

Collapse

proc.num[] questions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • talkinggoat
    Junior Member
    • Apr 2014
    • 10

    #1

    proc.num[] questions

    I am trying to work on getting proc.num to get the existance of a file, but I don't seem to be doing something right.

    I am using the command from the server:
    zabbix_get -s 192.168.15.172 -k proc.num[cmd.exe]
    0

    It returns zero, but I know cmd.exe is running on the host.


    Log:
    Code:
    			"host":"vm-win7-sith",
    			"key":"proc.num[cmd.exe]",
    			"value":"0",
    			"clock":1399837352,
    			"ns":692464270},
    I know the server is communicating with the host, because it will return data for agent.version

    zabbix_get -s 192.168.15.172 -k agent.version
    2.2.1

    Server version 2.2
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    Hmmmm.
    Works here, client is Win 2008R2, agent 2.2.1, server is the Zabbix appliance 2.0.10 patched to 2.0.11 on SuSE.

    Are you sure you have the zabbix_agentd.exe running under "LocalSystem"?
    Otherwise it does probably not have the required permissions to count somebody else's processes ...

    Comment

    • talkinggoat
      Junior Member
      • Apr 2014
      • 10

      #3
      That's a good idea. I checked the task manager, and the agentd.exe file is being run by the SYSTEM account. Does yours show the same? That should have access to do whatever it needs. I had the host agent up debugging to 4, and got this, as well as a bunch of other information:

      2496:20140511:164810.842 for key [proc.num[cmd.exe]] received value [0]
      2496:20140511:164810.842 In process_value() key:'vm-win7-sithroc.num[cmd.exe]' value:'0'

      Is it not working because I'm quering the IP address, not the DNS name?

      Comment

      • steveboyson
        Senior Member
        • Jul 2013
        • 582

        #4
        Querying the IP address is fine, that makes no difference.
        Are you able to query other processes?

        I'm running out of hints now ...

        Comment

        • talkinggoat
          Junior Member
          • Apr 2014
          • 10

          #5
          I queried processes owned by everyone, system, owner, localservice... everything. I queried svchost, which should have returned something, but returned a big "0"

          Everything else I've tried works, so it can't be a network issue.

          agent.hostname returns the correct hostname...
          net.if.discovery returns the list of network interfaces...

          When I installed the service, it was as the administrator... Right click cmd, run as adminstrator.

          It's a windows 7, 32bit machine and I installed the 32bit agent.

          Like you said, it should work, so I must be doing something wrong, but I'm not seeing any errors, anywhere.

          Comment

          • steveboyson
            Senior Member
            • Jul 2013
            • 582

            #6
            Really, I don't know what's wrong at this agent. I have one W2K3 (32bit), running 2.2.1, and working without any problems.

            Does the maximum debug level on agent side reveal any further problems?
            What does "zabbix-agentd.exe -c <your-agent-config.conf> -p" give? Does it work as expected?

            Comment

            • aib
              Senior Member
              • Jan 2014
              • 1615

              #7
              I'm sorry if my guess is wrong, but do you mind to check
              zabbix_get -s {IP_ADDRESS} -k proc.num["Command Prompt"]

              Sometimes, Windows uses the name of window to identify the processes, not the name of the real command.
              Sincerely yours,
              Aleksey

              Comment

              • talkinggoat
                Junior Member
                • Apr 2014
                • 10

                #8
                Here is some of the agent's log file...
                Code:
                  2684:20140512:121231.870 In send_buffer() host:'98.' port:10051 values:2/100
                  2684:20140512:121231.870 JSON before sending [{
                	"request":"agent data",
                	"data":[
                		{
                			"host":"vm-win7-sith",
                			"key":"proc.num[cmd.exe]",
                			"value":"0",
                			"clock":1399914745,
                			"ns":400827418},
                		{
                			"host":"vm-win7-sith",
                			"key":"proc.num[cmd.exe]",
                			"value":"0",
                			"clock":1399914747,
                			"ns":414620094}],
                	"clock":1399914749,
                	"ns":413400308}]
                  2684:20140512:121231.870 JSON back [{
                	"response":"success",
                	"info":"Processed 2 Failed 0 Total 2 Seconds spent 0.000126"}]
                  2684:20140512:121231.870 In check_response() response:'{
                	"response":"success",
                	"info":"Processed 2 Failed 0 Total 2 Seconds spent 0.000126"}'
                  2684:20140512:121231.870 info from server: 'Processed 2 Failed 0 Total 2 Seconds spent 0.000126'
                  2684:20140512:121231.870 End of check_response():SUCCEED
                As you can see, cmd.exe is clearly running... I'm going to check another computer, and see what happens.



                The forum won't allow me to post the results of the agentd command, because it contained too many links... but it spit out a bunch of stuff that looked normal.

                Comment

                • talkinggoat
                  Junior Member
                  • Apr 2014
                  • 10

                  #9
                  On a server 2k8 machine, I issued the command,
                  zabbix_get -s 127.0.0.1 -k proc.num[cmd.exe]
                  it returned "2"



                  On the other workstation, I issued the same command, and it still returned "0".

                  Could this be a bug?

                  Comment

                  • talkinggoat
                    Junior Member
                    • Apr 2014
                    • 10

                    #10
                    Can anyone else, with a Windows 7 x64 machine, test and see if they can reproduce this problem?

                    Comment

                    • Richards951
                      Junior Member
                      • Jul 2018
                      • 1

                      #11
                      You are using a different item key in your Zabbix configuration and your zabbix_get request - notice the second parameter being set to root. That adds extra filtering, and does not match your running php processes.

                      Comment

                      Working...