Aaron Gottlieb wrote:
> I recently installed Icinga on an Ubuntu 10.04 box.  I had to change
> the "notify-host-by-email" and "notify-service-by-email" commands to
> use a different mail client which could authenticate with an smtp
> server.
> I changed the commands and it would seem as though I do appropriately
> receive emails from Icinga, but when I view the notifications on the
> dashboard and bring up the page of commands, there is a message in red
> at the top of the page that says "Warning: Could not read resource
> file, raw command line could be incomplete!".
> I am on the page that says "Configuration" at the top, viewing the
> table "Commands".

at this stage you probably enabled the newly introduced cgi.cfg for full 
command resultion, right?

pls attach the cgi.cfg without spaces and #

>
> What does this warning mean?  I can see that my entire command line is
> present in the table, and I only modified the two lines of the
> commands.cfg file.

probably you did not. we actually implemented this check in a way it 
would be backwards compatible (not having the option does not check the 
resource.cfg)

         if (CGI_ID == CONFIG_CGI_ID && 
authorized_for_full_command_resolution(current_authdata)) {
                 if (access(resource_file, R_OK) != 0)
                         printf("<DIV 
CLASS='infoBoxBadProcStatus'>Warning: Could not read resource file, raw 
command line could be incomplete!</DIV>");
         }

and i am not aware of any other location printing this error.

$ grep -r 'Could not read resource file, raw command line could be 
incomplete' *
cgi/cgiutils.c:                 printf("<DIV 
CLASS='infoBoxBadProcStatus'>Warning: Could not read resource file, raw 
command line could be incomplete!</DIV>");


so, having full command resolution enabled for users/groups you must 
make sure that the apache user can read resource.cfg

the intention of warning you is - be aware that this is YOUR decision to 
make it gui readable, as resource.cfg might contain sensitive 
information. in our regard, we only want to grad $USERn$ macro from 
there to show you the full command line like the core would process.

final outcome - i can click on the service - extended details - click on 
ACTIVE - get to the command expander, getting host/svc as GET params 
passed, see the raw command line.
can get su - icinga on a shell, copy paste that command.

voila. no more pen and paper command translation.

ps: docs http://docs.icinga.org/latest/en/configcgi.html

*Allow user(s) for FULL command line view*

Format:

        

*authorized_for_full_command_resolution=<user1>,<user2>,<user3>,...<usern>*

Example:

        

*authorized_for_full_command_resolution=icingaadmin*

This option is a comma-delimited list of all usernames that can view a 
command in config command expander as Icinga would execute it. To 
resolve all MACROS it is necessary to allow read access to the web 
server for|resource.cfg|as well.

Alternatively you can specify contactgroups, too.

[Important]     Important

$USERXX$ vars and custom vars can contain sensitive data so access 
should be strictly limited.

[Note]  Note

This option is available starting with Icinga 1.6


>
> Thanks,
>
> Aaron
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> icinga-users mailing list
> icinga-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/icinga-users


-- 
DI (FH) Michael Friedrich

Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria

email:  michael.friedr...@univie.ac.at
phone:  +43 1 4277 14359
mobile: +43 664 60277 14359
fax:    +43 1 4277 14338
web:    http://www.univie.ac.at/zid
         http://www.aco.net

Lead Icinga Core Developer
http://www.icinga.org


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to