Ad Widget

Collapse

Zabbix Proxy Server Debug one host/item only

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheDon
    Junior Member
    • Nov 2015
    • 2

    #1

    Zabbix Proxy Server Debug one host/item only

    When enabling debug mode on a Proxy Server, one gets a lot of data. We have thousands of hosts that we monitor.
    The obvious problems include log size getting far too big and the amount of data that is being captured is not relevant to the host and item I'm trying to troubleshoot.

    The size issue is easily fixed by limiting the log file size. This is done in the config file on the Proxy Server. I set the limit to a gig: LogFileSize=1024 (that's the max limit in MB, option is 0 - 1024)

    Now the next issue of only wanting debug data relating to the host/item in question?

    Thank you for taking the time to read this and hopefully I'll get the answer soon
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello and welcome to Zabbix forums!

    Check the configuration files of your proxy and agent.
    Setting DebugLevel=4 will indeed produce lots of data and normally level 3 is recommended.

    However if you are using Zabbix 2.4.x then you can change this level with a runtime command without modifying the config file or restarting the process.


    Code:
    zabbix_proxy -R log_level_increase
    Once done with the debug, you can decrease the level with similar command.
    Code:
    zabbix_proxy -R log_level_decrease
    But also depends on what you are trying to troubleshoot per each host. Maybe some other methods can be even better.

    Best Regards,
    Ingus

    Comment

    • TheDon
      Junior Member
      • Nov 2015
      • 2

      #3
      Thank you for your response, additonal method I found

      Thank you and I'm looking forward to using this service going forward.

      I found to monitor the actual process from the Proxy Server I could do the following:
      1. Get the list of Zabbix processes running: ps aux | grep zabbix
      2. Identify the process ID, in this case I capture the IDs for all the Poller processes
      3. Enable debug for each process (ID): zabbix_proxy --runtime-control log_level_increase=<insert the IDs of the Poller Processes here>
      4. Then monitor the output, on-screen in real-time, by navigating to ./var/log/zabbix and monitor the output in real-time: tail -f zabbix_proxy.log | grep <insert the Host ID here>
      5. Once I have gathered enough data, I removed this additional logging by simply restarting the Zabbix Agent: service zabbix-proxy restart

      Ps. I got the Host ID by browsing to the host on the Zabbix web url and found the ID within the URL itself

      Comment

      Working...