I'm migrating to CentOS 7 from 6. I've installed Nagios through yum. The install works, meshes with systemd and everything. I've copied over my config files, worked out the bugs, nagios -v nagios.cfg says it's fine. But when I start it I get:
[1424718549] Error: p1.pl file required for embedded Perl interpreter is missing!
[1424718549] Bailing out due to errors encountered while initializing the embedded Perl interpreter. (PID=2801)
Inline perl is disabled:
#p1_file=/usr/sbin/p1.pl
#enable_embedded_perl=1
#use_embedded_perl_implicitly=1
p1.pl exists, but it's in /etc/sbin.
I'm stumped! Should I copy p1.pl to the bin directory?
p1.pl missing
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: p1.pl missing
If it's not too late I'd suggest starting over and installing from source. Last I knew the epel repo (which I assume is what you're using) had version 3.x, even for EL7. Installing from source is trivial and the benefits of 4.x are numerous.
Very high level...
Install Nagios:
Install Plugins
If possible start with a fresh machine of course. If you prefer to use the yum repo let us know and we'll try to solve the problem as it exists. I've seen the yum install on EL7 function properly.
Very high level...
Install Nagios:
Code: Select all
useradd -m nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache
git clone https://github.com/NagiosEnterprises/nagioscore
cd nagioscore/
yum -y install httpd php gcc glibc glibc-common gd gd-devel unzip
./configure --with-command-group=nagcmd
make all
make install; make install-init; make install-config; make install-webconf; make install-exfoliation; make install-commandmode
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload
systemctl start httpd
htpasswd -c -b /usr/local/nagios/etc/htpasswd.users nagiosadmin passwordCode: Select all
cd ~
wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
tar -xzvf nagios-plugins-2.0.3.tar.gz
cd nagios-plugins-2.0.3
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make; make installRe: p1.pl missing
I tried the tar balls first. The node is running except that it didn't set up the systemd links. I tried to do them manually, but they don't work. systemd is still an intensely frustrating mystery to me.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: p1.pl missing
For the time being init.d scripts *should* still install and *should* still work. CentOS7 has included support for the legacy init system for backward compatibility reasons. Hopefully by the time they break that support the source install should have proper systemd support.
Re: p1.pl missing
CentOs 7 doesn't really support the old system. "service nagios start" for instance is just an alias for systemctl. I suppose I could run things directly from init.d. 
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: p1.pl missing
I'm not really sure how you want to proceed at this point.
If we went back to revisit the original problem, /usr/sbin is the appropriate location for p1.pl. Is /usr/sbin in the user's path whom is trying to start the nagios process?
If we went back to revisit the original problem, /usr/sbin is the appropriate location for p1.pl. Is /usr/sbin in the user's path whom is trying to start the nagios process?
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: p1.pl missing
As an exercise I just did a yum install of Nagios from EPEL on a Cent7 machine, it worked no problem:
Nagios is up and running and responding properly. No plugins are installed so all of my services are broken, but Nagios is up.
Code: Select all
sudo yum -y install epel-release
sudo yum -y install nagios
sudo service start nagios
sudo service nagios start
sudo service httpd start
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --reload
sudo htpasswd -c -b /etc/nagios/passwd nagiosadmin nagiosadmin