since most of the users needed a system monitoring so putting forth a nagios setup for the easy monitoring of the tools.
$ sudo apt-get install -y gcc glibc glibc-common perl httpd php wget gd gd-devel
$ sudo apt-get install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils
$ systemctl start httpd
$ systemctl enable httpd
# Installing the Nagios and adding a user to the Nagios
https://assets.nagios.com/downloads/nagioscore/versions.php
$ wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.8.tar.gz
tar xzf nagioscore.tar.gz
cd nagioscore-nagios-4.4.8/
$ ./configure
$ make all
$ make install-groups-users finishing the installation of the nagios with the defined user group.
$ usermod -a -G nagios apache
$ make install
$ make install-daemoninit
$ htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin enabling the httpd
$ make install-commandmode
$ make install-config
$ make install-webconf
# Check the configuration file
cd /etc/apache2
apachectl configtest
# Installing the Nagios plugins:
$ wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/releases/download/release-2.4.1/nagios-plugins-2.4.1.tar.gz
$ tar zxf nagios-plugins.tar.gz
$ cd nagios-plugins-release-2.2.1/
$ ./tools/setup
$ ./configure
$ make
$ make install
# If you are downloading it from CPAN: https://metacpan.org/dist/Nagios-Monitoring-Plugin
$ perl -MCPAN -e shell
$ cpan install module
$ perl -MCPAN -e 'install Nagios::Monitoring::Plugin'
Nagios::Monitoring::Plugin A family of perl modules to streamline writing Nagios plugins
Nagios::Monitoring::Plugin::Config read nagios plugin .ini style config files
Nagios::Monitoring::Plugin::ExitResult Helper class for returning both output and return codes when testing.
Nagios::Monitoring::Plugin::Functions functions to simplify the creation of Nagios plugins
Nagios::Monitoring::Plugin::Getopt OO perl module providing standardised argument processing for Nagios plugins
Nagios::Monitoring::Plugin::Performance class for handling Nagios::Monitoring::Plugin performance data.
Nagios::Monitoring::Plugin::Range class for handling Nagios::Monitoring::Plugin range data.
Nagios::Monitoring::Plugin::Threshold class for handling Nagios::Monitoring::Plugin thresholds.
# Restarting the system and the nagios service
$ systemctl restart httpd.service
$ systemctl start nagios.service
$ start nagios service
$ nagios service status
# Two ways to start firewall, either in the system enabled or the cloud enabled.
$ firewall-cmd --permanent --zone=public --add-port=80/tcp
$ firewall-cmd --reload
or
# google cloud enabled
$gcloud compute --project=projectname firewall-rules create firewall-8080 --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:8080 --source-ranges=0.0.0.0/0
# Check the Nagios on http://localhost/nagios or http://externalip/nagios
alles super,
Gaurav