Ad Widget

Collapse

How to set the number of start agentd

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bill Wang
    Member
    • Jul 2010
    • 66

    #1

    How to set the number of start agentd

    As the title, on my monitored server, the number of start agentd always is 6, how could I control it?
  • eskytthe
    Senior Member
    Zabbix Certified Specialist
    • May 2011
    • 363

    #2
    In your zabbix_agentd.conf file
    (StartAgents=)
    br
    Erik

    Comment

    • Bill Wang
      Member
      • Jul 2010
      • 66

      #3
      Originally posted by eskytthe
      In your zabbix_agentd.conf file
      (StartAgents=)
      br
      Erik
      It doesn't work for me. I've tried to set it to 1, 5, or other numbers, but the number of processes is always 6.

      Comment

      • Davidus
        Senior Member
        • Dec 2010
        • 281

        #4
        in zabbix_agentd.conf

        ### Option: StartAgents
        # Number of pre-forked instances of zabbix_agentd that process passive checks.
        #
        # Mandatory: no
        # Range: 1-16
        # Default:
        StartAgents=5

        dont forget to restart agent

        Comment

        • Bill Wang
          Member
          • Jul 2010
          • 66

          #5
          Originally posted by Davidus
          in zabbix_agentd.conf

          ### Option: StartAgents
          # Number of pre-forked instances of zabbix_agentd that process passive checks.
          #
          # Mandatory: no
          # Range: 1-16
          # Default:
          StartAgents=5

          dont forget to restart agent
          Hi Davidus,

          Thanks for you reply, but as I've said, it doesn't work for me, no matter what number I set, the number of running agent is always 6.

          Comment

          • mikesphar
            Junior Member
            • Jun 2012
            • 12

            #6
            This is a few months old but I was just researching this myself, so I thought I'd offer a (hopefully correct) answer.

            The "StartAgents" parameter is specifically about the number of processes that start and listen for passive requests, but there are additional processes started for other purposes. You can see them being started in the zabbix agent log file when it starts up:

            Code:
              2470:20121203:145031.522 agent #0 started [collector]
              2471:20121203:145031.522 agent #1 started[listener]
              2472:20121203:145031.522 agent #2 started[listener]
              2473:20121203:145031.522 agent #3 started [active checks]
            In my case I have StartAgents set to 2, and I have active checks enabled. So I get 2 listener processes and 1 process for handling active checks and the collector process that collects data.

            Now if I set StartAgents=0 and restart the zabbix agent:

            Code:
              5440:20121203:145920.272 agent #0 started [collector]
              5441:20121203:145920.272 agent #1 started [active checks]
            If I uncomment StartAgents completely, I get 5 processes because the default is three listeners:
            Code:
              5638:20121203:150046.743 agent #0 started [collector]
              5639:20121203:150046.743 agent #1 started[listener]
              5640:20121203:150046.743 agent #2 started[listener]
              5641:20121203:150046.743 agent #3 started[listener]
              5642:20121203:150046.743 agent #4 started [active checks]
            So at the very least, if you're trying to figure out why the zabbix agent always starts six processes, check the startup messages in the agent log and see what those processes are being started for.

            Comment

            Working...