Regarding enforcing selinux on nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
sami21
Posts: 9
Joined: Thu Aug 27, 2015 2:09 am

Regarding enforcing selinux on nagios

Post by sami21 »

Hello,
I have a system Centos Release 6.8, installed NRPE on it. and monitoring through nagios server.
to monitor one of the service status on my client machine, I have used check_service.sh plugin which you can find on this link.
https://github.com/jonschipp/nagios-plu ... service.sh

but its giving error on nagios dashboard. attached it the snapshot.

I have added sudo permissions to the user and with selinux disabled or permissive it works fine on other environments.
I just don't understand what selinux context this plugin should have.
currently it has
-rwxr-xr-x root root unconfined_u:object_r:lib_t:s0 check_service.sh

Thanks for your help in advance.
Attachments
error on nagios dashboard.
error on nagios dashboard.
Capture.PNG (6.3 KiB) Viewed 2744 times
****samya****
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Regarding enforcing selinux on nagios

Post by avandemore »

Are you saying selinux isn't in permissive mode on your client system?

What is the output of rpm -qa |grep selinux-policy-targeted?
Previous Nagios employee
sami21
Posts: 9
Joined: Thu Aug 27, 2015 2:09 am

Re: Regarding enforcing selinux on nagios

Post by sami21 »

Thanks for your reply.
Currently it is in permissive mode.To resolve this issue I have to keep it in permissive mode.
But what if I want to keep it in Enforcing mode?
what selinux context this plugin should have?
I have tried contexts which are on plugins provided bydefault by nagios, but it doesn't work.
****samya****
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Regarding enforcing selinux on nagios

Post by dwhitfield »

SELinux enforcing is not supported, but some people have gotten it to work: https://fportase.wordpress.com/selinux- ... x-enabled/

That blog posted didn't test for 6.8, but they did for an earlier 6.x, so I would assume it works.
Locked