{"id":3069,"date":"2023-01-22T04:42:55","date_gmt":"2023-01-22T04:42:55","guid":{"rendered":"http:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/?p=3069"},"modified":"2023-01-22T04:43:26","modified_gmt":"2023-01-22T04:43:26","slug":"creating-a-nagios-coremonitoring-server","status":"publish","type":"post","link":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/2023\/01\/22\/creating-a-nagios-coremonitoring-server\/","title":{"rendered":"Creating a Nagios Core Monitoring Server"},"content":{"rendered":"<p>Nagios Core (formerly known as just Nagios) is a free tool that can be used to monitor networking equipment, server equipment, and general networking infrastructure. This is a command line tutorial therefore this can be done on either the desktop or the CLI version of Linux.<\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">OS Requirements<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Ubuntu Linux 20.04<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Install Required Packages<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">apt install wget unzip curl openssl build-essential libgd-dev libssl-dev libapache2-mod-php php-gd php apache2 -y<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Install nagios core<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">wget <\/span><a href=\"https:\/\/assets.nagios.com\/downloads\/nagioscore\/releases\/nagios-4.4.6.tar.gz\"><span style=\"font-weight: 400\">https:\/\/assets.nagios.com\/downloads\/nagioscore\/releases\/nagios-4.4.6.tar.gz<\/span><\/a><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Extract the downloaded files.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo tar -zxvf nagios-4.4.6.tar.gz<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Navigate to the setup directory.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">cd nagios-4.4.6<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Run the Nagios Core configure script.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo .\/configure<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Compile the main program and CGIs.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo make all<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Make and install group and user.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo make install-groups-users<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Add www-data directories user to the nagios group.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo usermod -a -G nagios www-data<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Install Nagios.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo make install<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Initialize all the installation configuration scripts.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo make install-init<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Install and configure permissions on the configs&#8217; directory.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo make install-commandmode<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Install sample config files.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo make install-config<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Install apache files.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo make install-webconf<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Enable apache rewrite mode.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo a2enmod rewrite<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Enable CGI config.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo a2enmod cgi<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Restart the Apache service.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo systemctl restart apache2<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Create a user and set the password when prompted.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">$ sudo htpasswd -c \/usr\/local\/nagios\/etc\/htpasswd.users admin<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Nagios Core (formerly known as just Nagios) is a free tool that can be used to monitor networking equipment, server equipment, and general networking infrastructure. This is a command line tutorial therefore this can be done on either the desktop or the CLI version of Linux. OS Requirements Ubuntu Linux 20.04 Install Required Packages apt &hellip; <a href=\"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/2023\/01\/22\/creating-a-nagios-coremonitoring-server\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Creating a Nagios Core Monitoring Server<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1303,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-3069","post","type-post","status-publish","format-standard","hentry","category-it-support"],"_links":{"self":[{"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/posts\/3069","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/users\/1303"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/comments?post=3069"}],"version-history":[{"count":2,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/posts\/3069\/revisions"}],"predecessor-version":[{"id":3071,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/posts\/3069\/revisions\/3071"}],"wp:attachment":[{"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/media?parent=3069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/categories?post=3069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.nationaltrail.k12.oh.us\/ittech\/wp-json\/wp\/v2\/tags?post=3069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}