2 Replies Latest reply on Nov 11, 2011 12:10 PM by Mike Langhorst

    Problem discovering configuration entries with wildcards

      I have a file that I need to inspect and look at the value1 field for every entry, all of the lines that will be in this file will be very similar.  The file is configured to use the "name = multi value" grammar, which seems to parse the file just fine. Example:

       

      command[check_disk_zone_mntapapoim4u04]= /usr/local/bin/sudo /app/nagios/libexec/check_disk -w 4% -c 1% -p /zone_mnt/apapoim4/u04

      command[check_disk_zone_mntapapoim4u02]= /usr/local/bin/sudo /app/nagios/libexec/check_disk -w 4% -c 1% -p /zone_mnt/apapoim4/u02

      command[check_disk_zone_mntapapoim4u01]= /usr/local/bin/sudo /app/nagios/libexec/check_disk -w 4% -c 1% -p /zone_mnt/apapoim4/u01

       

      I won't know what comes after check_disk inside the brackets, as it is dependet upon which filesystems exist on the host.  There are far too many variations to create them all as parts.  I don't intend to fix them in the compliance job, simply show that they are compliant/non-compliant based on the value1.

       

      I've tried:

      /app/nagios/etc/otherfs.cfg//*    Configuration File Entry    false    true    true    true    true

      &

      /app/nagios/etc/otherfs.cfg//command\[check_disk_*\]    Configuration File Entry    false    true    true    true    true

      &

      /app/nagios/etc/otherfs.cfg//command[check_disk_*]    Configuration File Entry    false    true    true    true    true

       

      But it doesn't seem to discover the entries in the file using any of these.  How can I get it to discover every line in the configuration file?  I guess I could create an Extended Object that does a simple "grep sudo <filename>" but it seems it should be easier to just have it as a configuration entry.