Ad Widget

Collapse

Logrotating SNMPTrapperFile

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • quackduck
    Member
    • Feb 2025
    • 36

    #1

    Logrotating SNMPTrapperFile

    If the file pointed to by SNMPTrapperFile logrotates by a logrotating daemon, then will Zabbix correctly notice that?
  • ISiroshtan
    Senior Member
    • Nov 2019
    • 324

    #2
    From Documentation:

    Log rotation

    Zabbix does not provide any log rotation system - that should be handled by the user. The log rotation should first rename the old file and only later delete it so that no traps are lost:
    1. Zabbix opens the trap file at the last known location and goes to step 3
    2. Zabbix checks if the currently opened file has been rotated by comparing the inode number to the defined trap file's inode number. If there is no opened file, Zabbix resets the last location and goes to step 1.
    3. Zabbix reads the data from the currently opened file and sets the new location.
    4. The new data are parsed. If this was the rotated file, the file is closed and goes back to step 2.
    5. If there was no new data, Zabbix sleeps for 1 second and goes back to step 2.

    Comment

    Working...