Editing
Adding a New Bleckmann Host to Nagios Monitoring
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
πΉ Step 1: Add DNS Entry (on Mercury Server) Before anything else: β’ Make sure the Nagios server can resolve the new serverβs hostname. β’ Log in to the Mercury server (your internal DNS server). β’ Add the DNS entry (IP > Hostname) for the new server. πΉ Step 2: Define the New Server in Nagios 1. Log in to the Nagios server Example: nagios.apoyar 2. Navigate to the machines config folder cd /usr/local/etc/nagios/objects/machines 3. Edit the config for the new server vi bleckmann.cfg o Add the host definition for the new server (similar to existing entries). o Save the file. πΉ Step 3: Add Service Checks for the New Server 1. Go to the services configuration directory: cd /usr/local/etc/nagios/objects/ 2. Edit the services.cfg file: vi services.cfg o Add the new server under all required services (like disk, CPU, memory). o Use the same format as other servers. πΉ Step 4: Validate Nagios Configuration Run the syntax check to ensure there are no errors: /usr/local/bin/nagios -v /usr/local/etc/nagios/nagios.cfg β’ Make sure "Total Warnings: 0" and "Total Errors: 0" β’ Fix anything if it shows up πΉ Step 5: Prepare the New Server for Monitoring 1. Create a nagios user: adduser nagios 2. Create a bin folder: cd /home/nagios mkdir bin 3. Change ownership: chown nagios:nagios /home/nagios/bin -R πΉ Step 6: Install Required Nagios Plugins & Dependencies Install the NRPE agent and required packages: '''Core plugins and dependencies''' yum install nagios-plugins yum install perl yum install python3-psutil ln -s /bin/python3 /usr/bin/python '''Perl modules''' dnf install perl-Array-Unique dnf install perl-File-Slurp dnf install perl-Number-Format dnf install nagios-plugins-perl dnf install perl-LWP-Protocol-https dnf install perl-List-MoreUtils '''EPEL and full NRPE plugin set''' yum install epel-release -y yum install nrpe nagios-plugins-disk nagios-plugins-load nagios-plugins-procs nagios-plugins-users nagios-plugins-swap nagios-plugins-http nagios-plugins-ping nagios-plugins-ssh -y πΉ Step 7: Copy Custom Plugins Go to the plugins directory: cd /usr/lib64/nagios/plugins/ here, get all custom or missing plugins from an existing monitored server. πΉ Step 8: Configure NRPE Edit the NRPE configuration: vi /etc/nagios/nrpe.cfg β’ Copy configuration style and plugin command definitions from an existing server. β’ Make sure all command[...] entries point to valid plugin scripts. πΉ Step 9: Enable and Start NRPE systemctl start nrpe.service systemctl enable nrpe.service systemctl status nrpe.service Ensure it is: β’ Active (running) β’ Enabled β’ No errors in status output πΉ Step 10: Finalize in Nagios Dashboard 1. Restart Nagios process (from web UI or via command line). 2. After restart, the new server will appear on the dashboard. 3. Manually reschedule checks for all its services. 4. Wait until all checks turn green and OK.
Summary:
Please note that all contributions to Apoyar Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Apoyar Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
British English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Apoyar Infrastructure
Active Directory
Recent changes
Random page
Upload file
Tools
What links here
Related changes
Special pages
Page information