Getting Nagios setup for the first time.

Posted July 7, 2019 3.1k views
Linux BasicsCentOSMonitoring


I am pretty new to Linux and I am trying to build a Nagios Monitoring System using CentOS7 Minimal version.

I follow this instruction on building my Nagios (

However, I cannot seem to start my nagios webpage. Below are some of the command that might help.

service httpd status

Redirecting to /bin/systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: man:httpd(8)


service nagios status

nagios (pid 3968) is running…

sudo apachectl configtest

AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using fe80::215:5dff:fe47:a10. Set the ‘ServerName’ directive globally to suppress this message

Syntax OK

Would really appreciate any help.

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers


Can you try the following:

  • First try starting your httpd service and then check the status again (the hostname warning that you are getting is not a problem)
  • If httpd fails to start, check your httpd error logs for the exact error that you get
  • Also use the netstat -plant command to check your ports, maybe there’s another service already listening on port 80 and that’s why apache is failing to start

If you wish you could provide me with your httpd error logs and the output of the netstat command so that I could advice further.


  • Hi Bobby,

    Here is the status of my httpd service:

    # service httpd status
    Redirecting to /bin/systemctl status httpd.service
    ● httpd.service - The Apache HTTP Server
       Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
       Active: active (running) since Tue 2019-07-09 08:09:10 NZST; 3min 50s ago
         Docs: man:httpd(8)
     Main PID: 1078 (httpd)
       Status: "Total requests: 1; Current requests/sec: 0; Current traffic:   0 B/sec"
       CGroup: /system.slice/httpd.service
               ├─1078 /usr/sbin/httpd -DFOREGROUND
               ├─1196 /usr/sbin/httpd -DFOREGROUND
               ├─1198 /usr/sbin/httpd -DFOREGROUND
               ├─1199 /usr/sbin/httpd -DFOREGROUND
               ├─1200 /usr/sbin/httpd -DFOREGROUND
               └─1201 /usr/sbin/httpd -DFOREGROUND
    Jul 09 08:09:08 nz-nagios.agility.local systemd[1]: Starting The Apache HTTP Server...
    Jul 09 08:09:10 nz-nagios.agility.local systemd[1]: Started The Apache HTTP Server.

    I did actually try to fix the hostname issue thinking that is the culprit. I created a hostname for my Nagios.

    I assume my httpd are now starting properly?

    Here is the result of netstat:

    # netstat -plant
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0    *               LISTEN      1080/sshd
    tcp        0      0  *               LISTEN      1210/master
    tcp        0      0     ESTABLISHED 1384/sshd: root@pts
    tcp6       0      0 :::80                   :::*                    LISTEN      1078/httpd
    tcp6       0      0 :::22                   :::*                    LISTEN      1080/sshd
    tcp6       0      0 ::1:25                  :::*                    LISTEN      1210/master

    Anything I need to check?

    When I try to access my nagios using http://<IP ADDRESS>/nagios I still get Not Found The requested URL /nagios was not found on this server.

Just an update, after I run all these command again ( it started my nagios. I just don’t know how messy this is now :)

Will just need to learn how to user Nagios. Thanks.

Oh that’s great! Well done :)