Am 16.09.2014 17:33, schrieb Daniel Bareiro:
After updating the icinga2 package from snapshots on
packages.icinga.org, I lost some changes made. I see that this was
because some files were overwritten with new releases, as the case of
manubulon file.

One change that I lost was the path of Manubulon plugin I am currently
using:

// DGB - 20140916 - Added "/non-std/"
command = [ ManubulonPluginDir + "/non-std/check_snmp_int.pl" ]


Although I can prevent again losing it doing the change directly on
ManubulonPluginDir on /etc/icinga2/constants.conf.

I also lost the "label" in snmp-interface command on the
command-plugins-manubulon.conf file:


object CheckCommand "snmp-interface" {
         import "snmp-manubulon-command"

         command = [ ManubulonPluginDir + "/check_snmp_int.pl" ]

         arguments += {
                 "-n" = "$snmp_interface$"
                 "-k" = {
                         set_if = "$snmp_interface_perf$"
                 }
                 "-B" = {
                         set_if = "$snmp_interface_bits$"
                 }
                 "--64bits" = {
                         set_if = "$snmp_interface_64bit$"
                 }
                 "-f" = {
                         set_if = "$snmp_perf$"
                 }
                 // DGB - 20140916
                 "--label" = {
                         set_if = "$snmp_label$"
                 }
         }

         vars.snmp_interface = "eth0"
         vars.snmp_interface_perf = true
         vars.snmp_interface_bits = true
         vars.snmp_interface_64bit = false
         vars.snmp_warn = "300,400"
         vars.snmp_crit = "0,600"
         vars.snmp_perf = true
         // DGB - 20140916
         vars.snmp_label = false
}



And in the "snmpv3" command on the command-plugins.conf file:


object CheckCommand "snmpv3" {
         import "plugin-check-command"

         command = [ PluginDir + "/check_snmp" ]

         arguments = {
                 "-H" = "$snmpv3_address$"
                 "-P" = 3
                 "--seclevel" = "authPriv"
                 "-U" = "$snmpv3_user$"
                 "-a" = "$snmpv3_auth_alg$"
                 "-A" = "$snmpv3_auth_key$"
                 "-x" = "$snmpv3_priv_alg$"
                 "-X" = "$snmpv3_priv_key$"
                 "-o" = "$snmpv3_oid$"
                 "-c" = "$snmpv3_crit$"
                 "-w" = "$snmpv3_warn$"
                 // DGB - 20140916
                 "-l" = {
                         set_if = "$snmpv3_use_label$"
                      value = "$snmpv3_label$"
                 }
         }

         vars.snmpv3_address = "$address$"
         vars.snmpv3_auth_alg = "SHA"
         vars.snmpv3_priv_alg = "AES"
      // DGB - 20140916
         vars.snmpv3_use_label = false
}


Is there any way to prevent this from happening with future updates?

Send your modifications upstream. That override is intentional, as these
files are shipped and controlled by the Icinga 2 sources, not the user.
Create a git patch with your author (first/last name, email) and attach
it to a new issue on dev.icinga.org

If you prefer to modify it locally, you can import these command objects
into your own checkcommand definition and use those like so

object CheckCommand "my-snmpv3" {
  import "snmpv3"

  arguments += {
    "-l" = {
      set_if = "$snmpv3_use_label$"
      value = "$snmpv3_label$"
    }
  }

  vars.snmpv3_use_label = false
}

Did not test that one though, could be broken. I personally prefer
patches upstream anyways.

Kind regards,
Michael

-- 
Michael Friedrich, DI (FH)
Application Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | [email protected]

** Open Source Backup Conference 2014 - September - osbconf.org **
** Puppet Camp Duesseldorf 2014 - Oktober - netways.de/puppetcamp **
** OSMC 2014 - November - netways.de/osmc **
** OpenNebula Conf 2014 - Dezember - opennebulaconf.com **
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to