Max Check Attempts required although set from Template

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
TheAdminDavid
Posts: 5
Joined: Thu May 15, 2025 3:48 am

Max Check Attempts required although set from Template

Post by TheAdminDavid »

Hello,

After the Update from 2024R1.4.1 to 2024R1.4.2 I can't save Hosts, Services and Templates anymore that don't have a "Max check attempts" value set.
Even when the value should be inherited from a template.

Before the Update I could create Items without the "Max check attempts" value to be set.
Now I am getting "Missing required fields".

We have a Template that defines the Check Interval

Code: Select all

define host {
    name                            Check - 24x7
    hostgroups                      Undefined
    check_command                   check-host-alive_ping!!!!!!!!
    initial_state                   d
    max_check_attempts              10
    check_interval                  5
    retry_interval                  1
    active_checks_enabled           1
    passive_checks_enabled          0
    check_period                    24x7
    register                        0
}
This template is used on a host:

Code: Select all

define host {
    host_name       Nagios Server
    use             Check - 24x7
    display_name    Nagios Server
    address         127.0.0.1
    hostgroups      Hardware Server,Linux Server
    icon_image      nagioslogo.png
    _port           443
    _url            myurl
    _url_path       /nagiosxi/
    register        1
}
Best Regards
TheAdminDavid
Last edited by TheAdminDavid on Tue May 20, 2025 5:01 am, edited 1 time in total.
Best Regards
TheAdminDavid
kg2857
Posts: 490
Joined: Wed Apr 12, 2023 5:48 pm

Re: Max Check Attempts required although set from Template

Post by kg2857 »

I think the status.dat has the entire config in it. Maybe have a look at the host in that file.
TheAdminDavid
Posts: 5
Joined: Thu May 15, 2025 3:48 am

Re: Max Check Attempts required although set from Template

Post by TheAdminDavid »

I checked the status.dat, and there the configuration is correct.
Nagios is also working as expected and uses the correct configuration.

The only problem there is, is that I can't edit any entry, that is missing the value because of the error message:
ErrorMessage_NagiosXIEdit.png

Code: Select all

hoststatus {
        host_name=Nagios Server
        modified_attributes=0
        check_command=check-host-alive_ping!!!!!!!!
        check_period=24x7
        notification_period=workhours
        importance=0
        check_interval=5.000000
        retry_interval=1.000000
        event_handler=
        event_handler_period=
        has_been_checked=1
        should_be_scheduled=1
        check_execution_time=0.004
        check_latency=0.001
        check_type=0
        current_state=0
        last_hard_state=0
        last_event_id=0
        current_event_id=575
        current_problem_id=0
        last_problem_id=0
        plugin_output=OK - 127.0.0.1: rta 0.021ms lost 0%
        long_plugin_output=
        performance_data=rta=0.021ms;3000.000;5000.000;0; pl=0%;80;100;0;100 rtmax=0.058ms;;;; rtmin=0.012ms;;;;
        last_check=1747388420
        next_check=1747388720
        check_options=0
        current_attempt=1
        max_attempts=10
        state_type=1
        last_state_change=1745321833
        last_hard_state_change=1745321833
        last_time_up=1747388420
        last_time_down=1745321846
        last_time_unreachable=0
        last_notification=0
        next_notification=0
        no_more_notifications=0
        current_notification_number=0
        current_notification_id=0
        notifications_enabled=1
        problem_has_been_acknowledged=0
        acknowledgement_type=0
        active_checks_enabled=1
        passive_checks_enabled=0
        event_handler_enabled=1
        flap_detection_enabled=1
        process_performance_data=1
        obsess=1
        last_update=1747388567
        is_flapping=0
        percent_state_change=0.00
        scheduled_downtime_depth=0
        _PORT=0;443
        _URL=0;myurl
        _URL_PATH=0;/nagiosxi/
        }
You do not have the required permissions to view the files attached to this post.
Best Regards
TheAdminDavid
haezerdesz
Posts: 1
Joined: Thu Aug 20, 2015 1:50 pm

Re: Max Check Attempts required although set from Template

Post by haezerdesz »

I am seeing the same thing here. I'm expecting another update soon, i hope.
TheAdminDavid
Posts: 5
Joined: Thu May 15, 2025 3:48 am

Re: Max Check Attempts required although set from Template

Post by TheAdminDavid »

I hope there is an update soon, since this is blocking us.
Does anyone have a good workaround in the meantime?

I really don't want to downgrade to the 2024R1.4.1.
Best Regards
TheAdminDavid
harrisj5
Posts: 6
Joined: Thu Apr 11, 2024 5:10 pm

Re: Max Check Attempts required although set from Template

Post by harrisj5 »

I opened a ticket with Nagios and thye provided a work around

We will add this issue to our development pipeline, and will address this bug, in the near future. Nagios uses an internal process to address bug fixes, for future releases.



Nagios does not offer updates on bug fix status, however, you can check future releases for bug fixes by checking the changelog, as this is the method used to post updates for these types of issues: https://www.nagios.com/changelog/ and look for our internal issue number in the changelog is 1879



In the meantime, you can workaround this issue by editing /usr/local/nagiosxi/html/includes/components/ccm/page_templates/check_settings.php



Change Line 61 from



<input name="tfMaxCheckAttempts" class="form-control required" type="text" id="tfMaxCheckAttempts" value="<?php echo encode_form_val(grab_array_var($FIELDS, 'max_check_attempts', ' ')); ?>">



to



<input name="tfMaxCheckAttempts" class="form-control" type="text" id="tfMaxCheckAttempts" value="<?php echo encode_form_val(grab_array_var($FIELDS, 'max_check_attempts', ' ')); ?>">
harrisj5
Posts: 6
Joined: Thu Apr 11, 2024 5:10 pm

Re: Max Check Attempts required although set from Template

Post by harrisj5 »

looks like all that was requried was to remove the word "required"

tested in my dev environment and it works
TheAdminDavid
Posts: 5
Joined: Thu May 15, 2025 3:48 am

Re: Max Check Attempts required although set from Template

Post by TheAdminDavid »

Thank you for the Workaround. I tested it, and it worked when removing the "required" value from the line.
It seems, in the new 2024R1.4.3 this issue should also be fixed, if I read the Release Notes correctly:

Fixed an issue where required fields in the CCM would block saving even if a template was present [GL:XI#1759,#1879] – BB
Best Regards
TheAdminDavid
bbahn
Posts: 379
Joined: Thu Jan 12, 2023 5:42 pm

Re: Max Check Attempts required although set from Template

Post by bbahn »

This will also be fixed in 2024R1.4.4, which fixes all the validation for hosts and services in the CCM.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
Post Reply