Chapter 6. Changing the insights-client schedule

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 instant.

Note

The procedure you use for changing the insights-client schedule depends on the RHEL version as shown in /etc/redhat-release.

6.1. Disabling the client schedule

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

Depending on which version of Insights client is installed and the RHEL version, you select the procedure steps as shown in the following table.

Table 6.1. Disabling the client schedule based on client version and RHEL release

RHEL versionClient versionActions

RHEL 6 through RHEL 7.4

Client 1.x

Note

Client 1.x is no longer supported.

Modify the configuration file /etc/insights-client/insights-client.conf and use the CLI

RHEL 7.5 and later

Client 1.x

Note

Client 1.x is no longer supported.

Use the CLI

RHEL 6, RHEL 7, and later

Client 3.x

Use the CLI

Procedure to disable for RHEL 7.4 and earlier with Client 1.x

NOTE

Client 1.x is no longer supported.

  1. Verify the client version by entering the insights-client command with the --version option.

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

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

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

  3. Open the /etc/insights-client/insights-client.conf file with an editor and add the following line.

    no_schedule=True

Procedure to disable for RHEL 7.5 and later with Client 1.x

NOTE

Client 1.x is no longer supported.

  1. Verify the client version by entering the insights-client command with the --version option.

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

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

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

Procedure to disable for RHEL 6, RHEL 7 and later with Client 3.x

  1. Verify the client version by entering the insights-client command with the --version option.

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

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

6.2. Enabling the Insights client schedule

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

Prerequisites

Procedure to enable with RHEL 7.4 or earlier and Client 1.x

NOTE

Client 1.x is no longer supported.

  1. Verify the client version by entering 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 and add change following line to False.

    no_schedule=False
  3. Enable the client schedule by entering the insights-client command with the --register option.

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

Procedure to enable with RHEL 7.5 or later and Client 1.x

NOTE

Client 1.x is no longer supported.

  1. Verify the client version by entering the insights-client command with the --version option.

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

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

Procedure to enable with RHEL 7 or later and Client 3.x

  1. Verify the client version by entering the insights-client command with the --version option.

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

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

6.3. Modifying the client schedule

You can modify when the Insights client runs by modifying the schedule. Which method you use depends on which RHEL release and which client version your system is running. Select the procedure that matches your version of RHEL.

6.3.1. Scheduling insights-client with cron

You can change the default schedule for running insights-client by updating a system cron file.

Note

The procedure for modifying insights-client with cron applies to RHEL 7.4 releases and earlier that are running Client version 1.x.

Prerequisites

Procedure

  1. After disabling the Insights client schedule, set up cron to execute insights-client on a schedule you prefer.
  2. Enable the insights-client schedule for RHEL 7.4 and earlier when you finish making changes.

6.3.2. Scheduling insights-client with systemd settings

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

Note

The systemd procedure applies to RHEL 7.5 and later.

Prerequisites

Procedure

  1. Enter the systemctl command to override the settings in the insights-client.timer systemd unit.

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

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

  2. The following settings are default values for the systemd unit. Enter different settings to modify the schedule.

    [Timer]
    OnCalendar=daily
    RandomizedDelaySec=14400
  3. Enable the insights-client schedule by entering the insights-client command with the --enable-schedule option.

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