issue with the 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.
h.sabrey
Posts: 30
Joined: Sun Jun 14, 2015 7:18 am

issue with the Nagios

Post by h.sabrey »

as i'm somehow new in linux, and i'm required to install a monitoring system to our company using CentOS7 with LAMP & the monitoring Application NAGIOS.

after installation everything goes well, until the installation of the TeamViewer then the nagios stopped and other issues happened thus this quesion(s) comes up.

1- apache service is confirmed running by

Code: Select all

service httpd status
the following was the result

Code: Select all

httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
   Active: active (running) since Sun 2015-12-06 22:29:35 EET; 9h ago
  Process: 27173 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
  Process: 3015 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Main PID: 27179 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─ 3032 /usr/sbin/httpd -DFOREGROUND
           ├─ 3033 /usr/sbin/httpd -DFOREGROUND
           ├─ 3034 /usr/sbin/httpd -DFOREGROUND
           ├─ 3035 /usr/sbin/httpd -DFOREGROUND
           ├─ 3036 /usr/sbin/httpd -DFOREGROUND
           └─27179 /usr/sbin/httpd -DFOREGROUND
but when trying to access the server http://192.168.1.7 there is no page to load ???

2- for Nagios, when checking the status it is running normally similar to the apache step, but when accessing the web http://192.168.1.7/nagios not webpage page to load ????

3- how to confirm that the apache and the nagios are autorun as a service after the server reboots?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: issue with the Nagios

Post by hsmith »

How did you install Nagios?

Source? Repo? Guide? If so, please link it.

It was working until you installed TeamViewer? Can you please go into more depth regarding this?
h.sabrey wrote:2- for Nagios, when checking the status it is running normally similar to the apache step, but when accessing the web http://192.168.1.7/nagios not webpage page to load ????
Is there a firewall running on your server?

Code: Select all

systemctl status firewalld
h.sabrey wrote:how to confirm that the apache and the nagios are autorun as a service after the server reboots?

Code: Select all

systemctl is-enabled httpd
systemctl is-enabled nagios
Former Nagios Employee.
me.
h.sabrey
Posts: 30
Joined: Sun Jun 14, 2015 7:18 am

Re: issue with the Nagios

Post by h.sabrey »

Nagios installation guide
https://www.youtube.com/watch?v=hQeVkapSaqM

firewall status :

Code: Select all

systemctl status firewalld
         firewalld.service - firewalld - dynamic firewall daemon
             Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
            Active: active (running) since Wed 2015-11-04 12:57:22 EET; 1 months 3 days ago
         Main PID: 692 (firewalld)
         CGroup: /system.slice/firewalld.service
                      └─692 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
for confirmation :

Code: Select all

$ system is-enabled httpd
bash: system: command not found...
[sysadmin@nagos-server ~]$ systemctl is-enabled httpd
disabled

Code: Select all

$ systemctl is-enabled nagios
nagios.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig nagios --level=5
enabled
mleo40
Posts: 37
Joined: Tue Jan 27, 2015 10:21 pm

Re: issue with the Nagios

Post by mleo40 »

your apache isn't running.

/etc/init.d/apache start (it might be /etc/init.d/httpd start...not overly familiar with CentOS)
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: issue with the Nagios

Post by hsmith »

mleo40 wrote:/etc/init.d/apache start (it might be /etc/init.d/httpd start...not overly familiar with CentOS)
it's httpd :)

service httpd status will tell you whether or not it is running as well.
Former Nagios Employee.
me.
h.sabrey
Posts: 30
Joined: Sun Jun 14, 2015 7:18 am

Re: issue with the Nagios

Post by h.sabrey »

friends,

for now i've added the httpd to the systemctl auto run by

Code: Select all

# systemctl enable httpd.service
but still not able to connect to nagios web portal

BTW i'm receiving emails from nagios as notification of one device which is not in my network ????
mleo40
Posts: 37
Joined: Tue Jan 27, 2015 10:21 pm

Re: issue with the Nagios

Post by mleo40 »

that command only enables the service at boot time, it doesn't actually start it

try systemctl start httpd.service
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: issue with the Nagios

Post by rkennedy »

Can you post the output of the following command -

Code: Select all

netstat -anp|grep :80
Former Nagios Employee
h.sabrey
Posts: 30
Joined: Sun Jun 14, 2015 7:18 am

Re: issue with the Nagios

Post by h.sabrey »

[
rkennedy wrote:Can you post the output of the following command -

Code: Select all

netstat -anp|grep :80

Code: Select all

# netstat -anp|grep :80
tcp6       0      0 :::80                   :::*                    LISTEN      3032/httpd 
mleo40
Posts: 37
Joined: Tue Jan 27, 2015 10:21 pm

Re: issue with the Nagios

Post by mleo40 »

Working output:

# netstat -anp|grep :80
tcp 0 0 :::80 :::* LISTEN 13150/httpd

your machine is only listening on ipv6 ... ? That is strange
Locked