Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Clarify three levels of Purging Policy


  • the number of revisions to keep, controlled by the property  keep_last,
  • and the maximum age of a revision, controlled by the property purge_older_than.

To explicitely explicitly disable keep_last or purge_older_than simply set the value to 0.


Inheritance, Setting up defaults

There are three levels of purging policy:

  1. Global
  2. Command Set
  3. Command


You can set a global default purging policy in conf/opCommon.nmis:

Code Block
'opconfig' => {
 'opconfig_purging_keep_last' => 100,        # keep 100 most recent revisions
 'opconfig_purging_purge_older_than' => 31536000, # purge revsrevisions older than 1 year
 'opconfig_purging_autoprotect_first_revision' => 'true', # protect the first revision by default

Command Set

You can extend or overrule that default for a whole command set, in in conf/command_sets.d/{vendor-name}.nmis:

Code Block
'IOS_HOURLY' => {                  # command set name
  'purging_policy' => {
    'keep_last' => 1000,
    'purge_older_than' => 2592000, # 30 days
    'autoprotect_first_revision' => 'true', 

This example overrules all the global defaults for all commands in the IOS_HOURLY set, with a shorter retaining period (but a higher number of minimum entries). 


Finally, you can also set a purging policy for a single command in a command set only, again overriding any of the command set or the global defaults. Here is such an example, again configured in in conf/command_sets.d/{vendor-name}.nmis:

Code Block
'TS_LINUX_PROCESSES' => {         # command set name
  'commands' => [
      'multipage' => 'true',
      'privileged' => 'true',
      'command' => 'ps -ef',      # command
	  'keep_last' => 0,
	  'purge_older_than' => 86400, 
      'tags' => [ 'troubleshooting', 'operatingsystem' ],

This example makes sure that for the command "ps -ef" in the TS_LINUX_PROCESSES command set, only the last day's revisions are kept, regardless of any global defaults policy or policy for the TS_LINUX_PROCESSES set. Note that keep_last needs to be disabled explicitely explicitly here, or the defaults for this setting would be inherited.