We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

Why does Nagios not reflect changes on the web page?

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Why does Nagios not reflect changes on the web page?

Postby Victor Pineda » Mon Dec 06, 2021 5:05 pm

Hello All,

I am new to Nagios and I am using Nagios 4.0.8 and I have made changes to a device configuration file and it is not reflected on the Nagios web page. You used the following commands to apply the changes: (/etc/init.d/nagios reload & /etc/init.d/nagios restart)
Generate two more config files to monitor url and port 21, but still can't see them on web page.
They can help me know what may be wrong.

Running this command does not mention errors.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg.

Regards.
Victor Pineda
Victor Pineda
 
Posts: 13
Joined: Thu Oct 28, 2021 8:51 am

Re: Why does Nagios not reflect changes on the web page?

Postby gormank » Tue Dec 07, 2021 4:57 pm

Assuming you're using Nagios Core, are you putting the .cfg files in the correct dir?
Have you checked the nagios.log file for info related to the new hosts/services?
Can you post one of the host/service configs that isn't working?
gormank
 
Posts: 1010
Joined: Tue Dec 02, 2014 12:00 pm

Re: Why does Nagios not reflect changes on the web page?

Postby Victor Pineda » Wed Dec 08, 2021 10:25 pm

Hi gormank,

Thanks for your reply.
Assuming you're using Nagios Core, are you putting the .cfg files in the correct dir?

**That's right, I add the files in the correct path and also add them in the nagios.cfg file

Have you checked the nagios.log file for information regarding new hosts / services?
**I found this in the last lines of the log:

[1639019371] Warning: Return code of 127 for check of service 'SSH' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019411] Warning: Return code of 127 for check of service 'Swap Usage' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019481] Warning: Return code of 127 for check of service 'Current Load' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019501] Warning: Return code of 127 for check of service 'Total Processes' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019521] Warning: Return code of 127 for check of service 'Current Users' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019561] Warning: Return code of 127 for check of service 'HTTP' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019591] Warning: Return code of 127 for check of service 'PING' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019631] Warning: Return code of 127 for check of service 'Root Partition' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019671] Warning: Return code of 127 for check of host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019671] Warning: Return code of 127 for check of service 'SSH' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019711] Warning: Return code of 127 for check of service 'Swap Usage' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019781] Warning: Return code of 127 for check of service 'Current Load' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019801] Warning: Return code of 127 for check of service 'Total Processes' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019821] Warning: Return code of 127 for check of service 'Current Users' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019861] Warning: Return code of 127 for check of service 'HTTP' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019891] Warning: Return code of 127 for check of service 'PING' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1639019931] Warning: Return code of 127 for check of service 'Root Partition' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.



Can you post one of the host / service configs not working?

## 'FTPTRANSFER.#######.COM' host definition
define host{
use generic-noping-webhost-ssl
host_name FTPTRANSFER.######.COM
alias ftptransfer.######.com
display_name ---------
address FTPTRANSFER.########.COM
check_command check_ssh
check_command check_ftp
max_check_attempts 5
notifications_enabled 0
notification_interval 0
notification_period 24x7
notification_options d,u,r
contact_groups Helpdesk
_react_instructions
icon_image globe.png
notes
_location AWS
_lob Brokerage, GTM
_env Production
_role SFTP Server
_current_os n/a
_current_os_ver n/a
_target_os TBD
_target_os_ver TBD
_apps App: FTP Server
_svcs Svc: File Integration
_url sftp:ftptransfer.######.com
_nat Dynamic
_os_owner GS-Wintel
_db_owner GS-Wintel
_app_owner GS-Wintel
_bus_owner
_strategy Invest (SFTP service consolidation)

### Service definition
define service{
use generic-service
host_name TRANSFER.#########.COM
service_description ftptranfer.#######.com port 21
is_volatile 0
check_period 24x7
max_check_attempts 5
normal_check_interval 760
retry_check_interval 360
notifications_enabled 0
contact_groups
_react_instructions
notification_interval 0
notification_period 24x7
notification_options c,r,s
check_command check_tcp!21
}



Thanks in advance.
Victor Pineda
Victor Pineda
 
Posts: 13
Joined: Thu Oct 28, 2021 8:51 am

Re: Why does Nagios not reflect changes on the web page?

Postby gormank » Thu Dec 09, 2021 6:58 pm

I use Nagios XI and the .cfg files are written to /usr/local/nagios/etc/hosts/ and /usr/local/nagios/etc/services/. I doubt that it's a good idea to put the host/service info in the nagios.cfg.
A return code of 127 looks like the plugin wasn't found.

It looks like there are two check commands defined for the sample host, which might be an issue. I'd also use check_ping or check_icmp (if it answers) rather than ssh or ftp.

Code: Select all
define host{
host_name FTPTRANSFER.######.COM
address FTPTRANSFER.########.COM
check_command check_ssh
check_command check_ftp


Does the host show in the UI and is it green?
gormank
 
Posts: 1010
Joined: Tue Dec 02, 2014 12:00 pm

Re: Why does Nagios not reflect changes on the web page?

Postby Victor Pineda » Fri Dec 10, 2021 11:08 am

Hi gormank,

I have found that no changes I made to the server are reflected on the Nagios web page.
On the server if it detects the new servers that I add, but on the web it is not reflecting them.

Thanks in advance.
Victor Pineda
Victor Pineda
 
Posts: 13
Joined: Thu Oct 28, 2021 8:51 am

Re: Why does Nagios not reflect changes on the web page?

Postby Victor Pineda » Fri Jan 07, 2022 11:01 am

Hi gormank,

Thank you very much for your help, your suggestion has helped me.

Regards.
Victor Pineda
Victor Pineda
 
Posts: 13
Joined: Thu Oct 28, 2021 8:51 am

Re: Why does Nagios not reflect changes on the web page?

Postby Victor Pineda » Fri Jan 21, 2022 12:24 pm

Hi All,

Can you help me to know why Nagios is not reflecting the changes I make on the server?
It allows me to save them and reload them but they are not shown in the web version of Nagios.
Even if I add a new server it is taken into account in the server count but it is not reflected.
I run the command to check for errors and it shows nothing.

I would greatly appreciate your help.

Regrads.
Victor Pineda
Victor Pineda
 
Posts: 13
Joined: Thu Oct 28, 2021 8:51 am

Re: Why does Nagios not reflect changes on the web page?

Postby gormank » Fri Jan 21, 2022 6:07 pm

Maybe you could post a screenshot of what you're seeing, such as the current status, hosts and services pages in Nagios?
Were you able to fix the return code of 127 issues?
gormank
 
Posts: 1010
Joined: Tue Dec 02, 2014 12:00 pm


Return to Community Support

Who is online

Users browsing this forum: DeepMohinman, Google [Bot], Majestic-12 [Bot] and 37 guests