Page 1 of 1

Permissions issues using Chef for import

Posted: Fri Dec 02, 2016 7:05 am
by jstoddart
Hi,

I am trying to automate service discovery by using Chef to generate cfg files and then run the reconfigure_nagios.sh script to load in the files.

However I am constantly getting permissions errors as attached, it seems the script only runs as root on the actual host, I cannot reconfigure as nagios either on the command line or logged in as nagiosadmin. Suspect something has incorrect permissions somewhere but cannot work out what?

There are no error details if I drill down on the links.

Re: Permissions issues using Chef for import

Posted: Fri Dec 02, 2016 10:25 am
by dwhitfield
Do you have a chef-specific user? What user is chef running as?

Can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the Download Profile button in the top right corner.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.

Re: Permissions issues using Chef for import

Posted: Fri Dec 02, 2016 10:39 am
by rkennedy
On a side note - is there a reason you're not using the API to push changes? It may be easier then manning a static directory. Depending how you're running things you'll more than likely need to add custom sudoer entries for your current attempt.

I've uploaded a pretty useful document I wrote a while back, that outlines how to use the API in conjunction with hostgroups + templates to help further automate your setup. You may find it useful.

Re: Permissions issues using Chef for import

Posted: Fri Dec 02, 2016 1:01 pm
by jstoddart
Thanks for response I will get the info you requested and read your doc.

Re: Permissions issues using Chef for import

Posted: Fri Dec 02, 2016 3:00 pm
by mcapra
Let us know if you have additional questions regarding this!

Re: Permissions issues using Chef for import

Posted: Sat Dec 03, 2016 1:34 am
by jstoddart
Have pm'd profile details as requested.

Re: Permissions issues using Chef for import

Posted: Mon Dec 05, 2016 10:18 am
by dwhitfield
@stoddart. That's a bummer about the profile not downloading. With that being the case, it is probably going to be quicker to just email [email protected]. When you do, please reference this ticket.

If a ticket is not going to work for whatever reason, could you answer the questions about the API and users in the thread? That way all of the techs can easily see the response. The reason we ask for profiles to be PMed is because there will be sensitive information in there. Thanks!

Re: Permissions issues using Chef for import

Posted: Tue Dec 06, 2016 8:24 am
by jstoddart
Been having another look today and seems to be related to SELinux being enabled, will raise an email ticket anyway.

Thanks for your help

Re: Permissions issues using Chef for import

Posted: Tue Dec 06, 2016 10:07 am
by dwhitfield
We look forward to the ticket. We'll let this open for now in case any community members have any input.

Re: Permissions issues using Chef for import

Posted: Wed Dec 07, 2016 12:06 pm
by rkennedy
Closing this out as a ticket has been received.