This is standard stuff in Nagios. Usually the password is stored in a macro which you define in the resource.cfg file, for example:
$USER3$=trustnoone Then you can refer to the macro name in your service or command definitions for example: define service{ use srv-pnp,generic-service host_name coreswitch1 service_description Unit04-Port18 check_command check_snmp_int!-C $USER3$ -2 -n "Unit 4 Port 18 " -fY -kqB -g -w 600000,600000,100,100,100000,10 -c 800000,800000,200,200,200000,20 -d 300 } Permissions are set appropriately on the resource.cfg file, and the resource.cfg file doesn't have to be in your code repo. Reference is made to this in the documentation at http://nagios.sourceforge.net/docs/nagioscore/3/en/configmain.html under the heading "Resource File" - you should also find examples in the sample config files which come with the standard Nagios install. hth, Jim On 18 April 2011 23:53, d <icantplaygui...@gmail.com> wrote: > Looking for info on how passwords are handled in configuration files. I > would preferably source them from a hidden file and then insert them via > macros into the nagios config. Has anyone done this (or similar)? I like > having my configuration files checked-in to a code repo but obviously don't > want the PWs. > Thanks. > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null > ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null