On 27.11.2013 20:56, Seth Galitzer wrote:
> When trying to export a config,

One should add that it's done using the LConf Icinga Web cronk and 
therefore an additional feature not shipped out of the box with Icinga 
itsself.

> it returns "An unknown error occured,
> check your server logs". I've looked through apache logs and syslog,
> with no clues found as to what's causing the error. I've added the
> apache user to the lconf and icinga groups. The apache user is
> configured in /etc/sudoers to run the export script, but I also tried
> setting the apache user in as the lconf user directly in
> $lconf/etc/config.pm.
>
> I added the execute string to $icingaweb/etc/conf.d/access.xml per
> instructions on the wiki. I also added it to access.xml files in
> $icingaweb/apps/modules/LConf/config and $web/apps/modules/Api/config (I
> wasn't sure which one was necessary, so I just added it to all three).

Cleared the cache after modifying the configuration?
> I
> also tried adding -d logfile to the execute string in each of these to
> get more verbose output. This is what it currently looks like in each of
> these files:
>
> <resource name="lconf_export">sudo -u lconf
> /var/lib/lconf/bin/LConfExport.pl -d /tmp/lconf_export.log</resource>
>
> Icinga config files are never generated and the debug logfile is also
> never created. Running the export script from cli works correctly every
> time. This smells like a permissions problem, but I can't seem to find
> where it's falling down. Any suggestions?

I'd check the sudoers permissions. The apache user must be able to call 
sudo as a different user (the lconf cli user) which then may run the 
export, and create the (debug) file(s). Replace the variables with their 
actual values - since you didn't tell about your distribution, can't 
clarify on that.

# visudo

$apacheuser ALL=($lconfcliuser) NOPASSWD: $path_to_lconf_deploy_script


Maybe the apache user requires a tty by default. You should fix that by 
disabling requiretty for that user as defaults.

>
> I'm using icinga 1.10.1, icinga-web 10.10.0, lconf 1.3.0 from the
> tarball, and lconf-icinga plugin 1.3.2.
>
> Thanks.
> Seth
>


-- 
DI (FH) Michael Friedrich

mail:     michael.friedr...@gmail.com
twitter:  https://twitter.com/dnsmichi
jabber:   dnsmi...@jabber.ccc.de
irc:      irc.freenode.net/icinga dnsmichi

icinga open source monitoring
position: lead core developer
url:      https://www.icinga.org


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to