Ad Widget

Collapse

Saving deleted hosts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cdslaughter
    Member
    • Jun 2018
    • 69

    #1

    Saving deleted hosts

    I have a need to save all the hosts that are created. even the deleted ones.
    I was looking at the php code that does the delete and was wondering if I could just change the status value to another number that is not used, say 99 for example. I want to hold onto the host and host inventory table for historical purposes.

    Does anyone know if this would cause an issue in any other part of the code?

    Carl Slaughter
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Just disable host.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • cdslaughter
      Member
      • Jun 2018
      • 69

      #3
      I could just disable them, but I have a script that is already looking for disabled hosts for other reasons.. I was wanting to place deleted hosts in a different state other than active or disabled..

      Comment

      • kloczek
        Senior Member
        • Jun 2006
        • 1771

        #4
        That is another fact that it would be more states of the hosts or even possibility ti define custom states using basic other properties like:
        - on/off monitoring (monitoring data are collected)
        - on/off processing of the triggers
        - active/inactive => monitoring cfg is kept and propagated to agents.proxies

        With something like this something like 'host is in maintenance state' could be defined as custom set of the above settings.
        FYI: in zabbix host which is din disabled state its monitoring cfg metadata still are present in server cfg cache.

        Other thing is that in many environments hosts have own states like: installed, ready, almost ready, active, decommissioned, disabled, temporary disabled (and probably this list can be even more elongated) and it would be good to be able those admin states to zabbix hosts states.
        http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
        https://kloczek.wordpress.com/
        zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
        My zabbix templates https://github.com/kloczek/zabbix-templates

        Comment

        Working...