Ad Widget

Collapse

statsallowip not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gerd Mueller
    Junior Member
    • Sep 2022
    • 1

    #1

    statsallowip not working

    Hi forum,

    I need to monitor the zabbix server status with a third party tool. Configuring statsallowip as documented here https://www.zabbix.com/documentation...s/remote_stats doesn't work. zabbix_get gets me always following errors:

    zabbix_get -s my.servers.address -k "zabbix.stats"
    zabbix_get [3520239]: Get value error: ZBX_TCP_READ() failed: [104] Connection reset by peer
    zabbix_get [3520239]: Check access restrictions in Zabbix agent configuration​

    Anyone any idea?

    Thanks Gerd
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    The zabbix_get accesses the zabbix_agent, therefore, the agent configuration must have "connection permission" = address in the "Server" list in the agent configuration.
    Next, the agent requests data from the server from its own address, and the server will give them only to the allowed addresses from the "StatsAllowedIP" list
    I recommend using the full syntax when requesting a key to avoid confusion. zabbix.stats[<ip>,<port>,queue,<from>,<to>]​ https://www.zabbix.com/documentation...s/zabbix_agent

    If you request statistics directly from the server (not through an agent) by another zabbix server, then other keys work (zabbix[stats,<ip>,<port>]) . And in this case, the connection permission is taken only from the "StatsAllowedIP".
    Last edited by Hamardaban; 26-09-2022, 14:14.

    Comment


    • Gerd Mueller
      Gerd Mueller commented
      Editing a comment
      Ah, that helps. I thought I could query the server directly. Thanks

      I will use this way now.
Working...