Ad Widget

Collapse

zabbix server overwriting edited php files to default content

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KBBarbers
    Junior Member
    • Oct 2024
    • 12

    #1

    zabbix server overwriting edited php files to default content

    Hi I have a strange behavior on my zabbix server.

    I have edited the defines.inc.php, maps.inc.php, and sysmaps.php files to allow the status label on map hosts to only show during a problem status, and to not show during default green "OK" status and this works fine. The problem is that having made the changes on Tuesday and verified that the maps were displaying as desired, I returned from A/L today and found that all three of these files had reverted to their unedited status. I have now remade the same changes, and made backups of these files anticipating that zabbix will continuously revert them but obviously manually copy pasting the files in every few days isnt a proper solution.

    Why did this happen? Is there some configuration in zabbix where it is reverting these files after some period of time? The zabbix server runs on a VM and I don't believe that it rebooted but if it had would zabbix overwrite php files on reboot?

    ...

    And for those curious on the exact changes I made to the maps:

    I used a method inspired by the patch posted in the support ticket below. However this patch was a) for an old version and is not compatible with up to date zabbix as some of the php logic changed in maps.inc.php and b) that patch was only aiming to remove the status label in all cases whether the host was in an OK or error status.

    [ZBXNEXT-2665] Maps elements with label but without status - ZABBIX SUPPORT

    I therefore had to look at the patch .diff file to understand what the patch was trying to achieve to see where to start and then make some slightly different changes to the .php files accommodating the changed logic in the new version and my different news

  • KBBarbers
    Junior Member
    • Oct 2024
    • 12

    #2
    I had a thought

    I ran a sudo dnf update command later that day as a recommended prerequisite to installing another package that probably updated the version of Zabbix and I can't think of anything else that would have overwritten the files

    I'm assuming this is intended behavior but it does leave any user that wants to customize the PHP in a bit of an awkward situation. At least there aren't auto updates!

    Comment

    Working...