Page 1 of 1

Core Config Manager Daily Snapshots

Posted: Tue Oct 12, 2021 7:43 am
by andyb4u
Hi,

Does Core Config Manager take an automatic daily snapshot?

I'm not sure if it's normal behaviour or a sign of an issue. I haven't been able to find any information on it.

I'm seeing snapshots that seem to occur daily around the same time but not instigated by a user applying changes.

Regards,
Andy

Re: Core Config Manager Daily Snapshots

Posted: Tue Oct 12, 2021 2:52 pm
by benjaminsmith
Hi Andy,

Besides the daily snapshot running on a cron schedule, it should take a snapshot every time configuration is applied.

Let's trying running the tail command below and then apply configuration to capture debug output.

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
--Benjamin

Re: Core Config Manager Daily Snapshots

Posted: Wed Oct 13, 2021 4:05 am
by andyb4u
Hi,

We do see a snapshot being taken each time configuration is applied.

Are you saying there is a daily snapshot running on a cron schedule? If so, is there a way to see how that is configured?

Re: Core Config Manager Daily Snapshots

Posted: Wed Oct 13, 2021 3:49 pm
by benjaminsmith
Hi,

It's the nom.php scrit and it runs on a cron job, see /etc/cron.d/nagiosxi.

Code: Select all

[root@localhost cron.d]# cat nagiosxi
# /etc/cron.d/nagiosxi: crontab fragment for nagiosxi

# Backup MySQL & PostgreSQL Databases
0   7 * * * root   /root/scripts/automysqlbackup
0   7 * * * root   /root/scripts/autopostgresqlbackup > /dev/null 2>&1

*   * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1
*   * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
*   * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1
*   * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1
*   * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1
*   * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1
*   * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1
*   * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1
*/5 * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php >> /usr/local/nagiosxi/var/dbmaint.log 2>&1
*   * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1
01  * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/recurring_downtime.php >> /usr/local/nagiosxi/var/recurringdowntime.log 2>&1
*       * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/snmptt_service_results.php >> /usr/local/nagiosxi/var/snmptt_service_results.log 2>&1
*   * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php >> /usr/local/nagiosxi/var/deadpool.log 2>&1
There's an interval, nom_checkpoint_interval, in config.inc.php that specifies how often it's going to take a snapshot.

Code: Select all

$cfg['component_info'] = array(
    "nagioscore" => array(
        "root_dir" => "/usr/local/nagios",
        "cgi_dir" => "/usr/local/nagios/sbin",
        "import_dir" => "/usr/local/nagios/etc/import",
        "static_dir" => "/usr/local/nagios/etc/static",
        "plugin_dir" => "/usr/local/nagios/libexec",
        "cgi_config_file" => "/usr/local/nagios/etc/cgi.cfg",
        "cmd_file" => "/usr/local/nagios/var/rw/nagios.cmd",
        "log_file" => "/usr/local/nagios/var/nagios.log",
        "nom_checkpoint_interval" => 1440, // time (in minutes) between nom checkpoints
Hope that helps answer your questions. If this is not running, let's check the cron service and logs.

Code: Select all

systemctl status crond
 tail -n 100 /var/log/cron

Re: Core Config Manager Daily Snapshots

Posted: Thu Oct 14, 2021 7:35 am
by andyb4u
Thank you. That's exactly the information I needed. It is running as expected.

Re: Core Config Manager Daily Snapshots

Posted: Thu Oct 14, 2021 9:45 am
by benjaminsmith
Thank you. That's exactly the information I needed. It is running as expected.
Excellent! We'll close this one out but feel free to open another post if you have future issues.

Thank you for using Nagios.

--Benjamin