Permissions issues using Chef for import

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jstoddart
Posts: 46
Joined: Fri Apr 11, 2014 5:52 am

Permissions issues using Chef for import

Post 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.
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Permissions issues using Chef for import

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Permissions issues using Chef for import

Post 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.
You do not have the required permissions to view the files attached to this post.
Former Nagios Employee
jstoddart
Posts: 46
Joined: Fri Apr 11, 2014 5:52 am

Re: Permissions issues using Chef for import

Post by jstoddart »

Thanks for response I will get the info you requested and read your doc.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Permissions issues using Chef for import

Post by mcapra »

Let us know if you have additional questions regarding this!
Former Nagios employee
https://www.mcapra.com/
jstoddart
Posts: 46
Joined: Fri Apr 11, 2014 5:52 am

Re: Permissions issues using Chef for import

Post by jstoddart »

Have pm'd profile details as requested.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Permissions issues using Chef for import

Post 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!
jstoddart
Posts: 46
Joined: Fri Apr 11, 2014 5:52 am

Re: Permissions issues using Chef for import

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Permissions issues using Chef for import

Post by dwhitfield »

We look forward to the ticket. We'll let this open for now in case any community members have any input.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Permissions issues using Chef for import

Post by rkennedy »

Closing this out as a ticket has been received.
Former Nagios Employee
Locked