Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpms / specs / pnp4nagios / pnp4nagios.spec #223

Closed
Fiyorin opened this issue Dec 21, 2012 · 7 comments
Closed

rpms / specs / pnp4nagios / pnp4nagios.spec #223

Fiyorin opened this issue Dec 21, 2012 · 7 comments

Comments

@Fiyorin
Copy link

Fiyorin commented Dec 21, 2012

after installing this package (self compiled), i get a warning:

warning: user nagios does not exist - using root
warning: group nagios does not exist - using root

same if i pass the user/group of icinga to configure.
in the #icinga irc room, a guy said i should post the issue here:
" hm, afaik that's the issue with pnp requiring nagios previously
haven't investigated further yet"

@dnsmichi
Copy link
Contributor

that guy was me btw.

@dnsmichi
Copy link
Contributor

i've now added a somehow ugly method detecting if icinga is installed, and adding the icinga user if not existing too. this requires a change to all the configs (npcd will run as icinga user e.g.)

while i am at it, i've also fixed all known locations which are hardcoded nagios default, and may need an adjustment for icinga. once icinga is detected, this is adjusted in %post to match the icinga rpm setup accordingly (check the diff for details).

for nagios, the htpasswd.users location in the httpd config is also fixed while fixing the rest.

the detection if icinga is installed, now focuses on icinga.cfg and icinga binary, but that may be properly fixed by someone in the future.

@buschsalat
Copy link

Maybe I'm doing something wrong, but your fix isn't working. I'm trying to build a pnp4nagios rpm for version 0.6.19.
In the spec file I added these three lines:
--with-nagios-user=icinga
--with-nagios-group=icinga
--with-command-group=icingacmd

When installing my rpm I still get these error messages:
warning: user nagios does not exist - using root
warning: group nagios does not exist - using root

@dnsmichi
Copy link
Contributor

did you check the fix and used the spec file from git? you do not need any changes at all, only having the icinga package installed in order to detect the proper usernames and configs.

@buschsalat
Copy link

I used https://raw.github.com/repoforge/rpms/master/specs/pnp4nagios/pnp4nagios.spec found at https://wiki.icinga.org/display/howtos/Build+PNP+RPMs.
Also tried https://raw.github.com/dnsmichi/rpms/master/specs/pnp4nagios/pnp4nagios.spec. Same result, but had to fix this:
File listed twice: /usr/lib64/pnp4nagios/npcdmod.o
Installed (but unpackaged) file(s) found:
/usr/libexec/rrd_modify.pl

Haven't seen a different spec file anywhere. Icinga is properly installed, including nagios-plugins and icinga-web. Everything with own rpms. /etc/icinga/icinga.cfg and /usr/bin/icinga are present. As are icinga user and icinga/icingacmd groups.

@buschsalat
Copy link

I changed the %post part of your fixed spec file. Removed the else part and made the part where every path is changed to icinga mandatory. Still used
--with-nagios-user=icinga
--with-nagios-group=icinga
--with-command-group=icingacmd
in %configure and built the RPM. Error message still says:
warning: user nagios does not exist - using root
warning: group nagios does not exist - using root
Right now, I am not able to find the reason for that.

@dnsmichi
Copy link
Contributor

I've tested my spec file with and without icinga installed before uploading to repoforge. I am sorry, but I have no idea nor insight what you are doing wrong here. And instead of flooding this already closed issue please rather use the mailinglists for better reading and discussion on your issue of building the pnp4nagios spec file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants