Search

Chapter 8. Changing the insights-client schedule

download PDF

You can disable, enable, and modify the schedule that controls when the Insights client runs. By default, the Insights client runs every 24 hours. The timers in the default schedules vary so that all systems do not run the client at the same time.

8.1. Disabling the Insights client schedule

You must disable the client schedule before you can change the default Insights client settings and create a new schedule.

The procedure you use to disable the insights-client schedule depends on your Red Hat Enterprise Linux and client versions.

8.1.1. Disabling the client schedule on RHEL 7.4 and earlier with Client 1.x

Note

Client 1.x is no longer supported.

Note

The --no-schedule option is deprecated in Client 3.x and later.

Prerequisites

  • Root-level access to your system.

Procedure

  1. Enter the insights-client command with the --version option to verify the client version.

    [root@insights]# insights-client --version
    Client: 1.0.2-0
    Core: 1.0.76-1
  2. Enter the insights-client command with the --no-schedule option to disable the client schedule. This command removes the symbolic link in /etc/cron.daily.

    [root@insights]# insights-client --no-schedule
  3. Open the /etc/insights-client/insights-client.conf file with an editor and add the following line.

    no_schedule=True

8.1.2. Disabling the client schedule for RHEL 7.5 and later with Insights client 1.x

Note

Insights client 1.x is no longer supported.

Note

The --no-schedule option is deprecated in Insights client 3.x and later.

Prerequisites

  • Root-level access to your system.

Procedure

  1. Enter the insights-client command with the --version option to verify the client version.

    [root@insights]# insights-client --version
    Client: 1.0.2-0
    Core: 1.0.76-1
  2. Enter the insights-client command with the --no-schedule option to disable the client schedule.

    [root@insights]# insights-client --no-schedule

8.1.3. Disabling the client schedule for RHEL 6, RHEL 7 and later with Client 3.x

Note

Client 1.x is no longer supported.

Note

The --no-schedule option is deprecated in Client 3.x and later.

Prerequisites

  • Root-level access to your system.

Procedure

  1. Enter the insights-client command with the --version option to verify the client version.

    [root@insights]# insights-client --version
    Client: 3.0.6-0
    Core: 3.0.121-1
  2. Enter the insights-client command with the --disable-schedule option to disable the client schedule.

    [root@insights]# insights-client --disable-schedule

8.2. Enabling the Insights client schedule

When you first enable the client schedule, it runs using its default settings. If you make changes to the schedule, those settings take precedence.

When you run insights-client from the command line, Insights client runs using the settings you specify for only that session. When the next scheduled run takes place, it uses the default settings.

8.2.1. Enabling the Insights client schedule on RHEL 7.4 or earlier and Client 1.x

You can enable the client schedule so that it runs on its default settings. If you change the default schedule settings, the changed settings take precedence.

Prerequisites

  • Root-level access to your system.
  • The client schedule is disabled.
  • (Optional) You modified the default schedule.

Procedure

  1. To verify the client version, enter the insights-client command with the --version option.

    [root@insights]# insights-client --version
    Client: 1.0.2-0
    Core: 1.0.76-1
  2. Open the /etc/insights-client/insights-client.conf file with an editor. Add the following line to the file. If your configuration file already has a value for no_schedule, change it to False.

    no_schedule=False
  3. Enter the insights-client command with the --register option to enable the client.

    [root@insights]# insights-client --register

8.2.2. Enabling the Insights client schedule on RHEL 7.5 or later and Client 1.x

You can enable the client schedule so that it runs on its default settings. If you change the default schedule settings, the changed settings take precedence.

Note

Client 1.x is no longer supported.

Prerequisites

  • Root-level access to your system.
  • The client schedule is disabled.
  • (Optional) You modified the default schedule.

Procedure

  1. To verify the client version, enter the insights-client command with the --version option.

    [root@insights]# insights-client --version
    Client: 1.0.2-0
    Core: 1.0.76-1
  2. Enter the insights-client command with the --register option to enable the client schedule.

    [root@insights]# insights-client --register

8.2.3. Enabling the Insights client schedule on RHEL 7 or later and Client 3.x

You can enable the client schedule so that it runs on its default settings. If you change the default schedule settings, the changed settings take precedence.

Prerequisites

  • Root-level access to your system.
  • The client schedule is disabled.
  • (Optional) You modified the default schedule.

Procedure

  1. To verify the client version, enter the insights-client command with the --version option.

    [root@insights]# insights-client --version
    Client: 3.0.6-0
    Core: 3.0.121-1
  2. Enter the insights-client command with the --enable-schedule option to enable the client schedule.

    [root@insights]# insights-client --enable-schedule

8.3. Modifying the Insights client schedule

To change when the Insights client runs, modify the schedule. The method that you use depends on the RHEL release and client version that your system is running.

Select the procedure that matches your version of RHEL.

  • For Red Hat Enterprise Linux 7.4 and earlier, use cron to modify the system schedule.
  • For Red Hat Enterprise Linux 7.5 and later, update the systemd settings and the insights-client-timer file.

8.3.1. Scheduling the Insights client with cron

Note

Use this procedure for systems running RHEL 7.4 releases and earlier with Client version 1.x.

Note

Client 1.x is no longer supported.

To change the default schedule for running insights-client, update a system cron file.

In Red Hat Enterprise Linux, the /etc/crontab file automatically executes scripts in several subdirectories at regular periods.

/etc/cron.hourly
/etc/cron.daily
/etc/cron.weekly
/etc/cron.monthly

Prerequisites

  • Root-level access to your system.
  • The Insights client schedule is disabled.

Procedure

  1. Select a schedule and set up cron to execute insights-client on it.
  2. Enable the insights-client schedule when you finish making changes.

Additional resources

8.3.2. Scheduling insights-client using systemd settings

Note

Use this for systems running RHEL 7.5 and later with Client 3.x.

You can change the default schedule for running insights-client by updating the system systemd settings and the insights-client.timer file.

Prerequisites

  • Root-level access to your system.

Procedure

  1. To edit the settings in the insights-client.timer file, enter the systemctl edit command and the file name.

    [root@insights]# systemctl edit insights-client.timer

    This action opens an empty file with the default system editor.

  2. Enter different settings to modify the schedule. The values in this example are the default settings for systemd.

    [Timer]
    OnCalendar=daily
    RandomizedDelaySec=14400
  3. Enable the insights-client schedule.

    [root@insights]# insights-client --enable-schedule

Additional resources

8.3.3. Refreshing the package cache for systems managed by Red Hat Satellite

Insights now provides the optional --build-packagecache command to provide accurate reporting for applicable updates on Satellite-managed systems. This option rebuilds the yum/dnf package caches for insights-client, and creates a refreshed list of applicable updates for the system.

You can run the command manually to rebuild the package caches immediately, or you can edit the client configuration file (/etc/insights-client/insights-client.conf) to rebuild the package caches automatically each time the system checks in to Insights.

Additional resources

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.