Help Center User GuideGetting StartedFAQRelease Notes
User Guide
Getting Started
Release Notes

Frequency Profiles and Offset Time

Frequency Profiles

Frequency profiles are a central location in which sensor and rule time frequencies can be managed. To understand frequency profiles, consider the following.

When defining rules in HealthBot you can:

  • Define multiple rules that use the same sensor

  • Define different sensor frequencies for each of the rules

  • Apply all of these rules to the same device group/devices

This creates complexity in rule application and frequency adjustments within the individual rules:

  • A key, consisting of sensor-path for OpenConfig and Native GPB sensors, or the tuple of file and table for iAgent sensors is used to identify the specific rules.

  • HealthBot takes the minimum defined frequency for that sensor from the applied rules and uses it to subscribe to, or fetch, data from the devices.

  • This make it hard to identify what the data rate should be for that sensor. To do that, you would have to go through the all the applied rules.

  • A change in the sensor frequency of an applied rule might not take effect as intended.

To address these complexities, HealthBot needed a common place from which to control these frequencies.

Starting in HealthBot 3.0.0, frequency profiles can be created that allow you to manage sensor and rule frequencies from a single location and then apply the profiles in various locations in HealthBot. Application of these profiles allows for persistent and repeatable behavior in regard to frequencies for rules, sensors, triggers, formulas, references, learning periods, and hold times.

A sensor profile consists of a profile name and two optional sections: the sensors section and the non-sensors section. In each section, an entry consists of a sensor or rule name and a frequency. Frequency profiles are applied to device groups or network groups.

The steps for configuration are shown below.

Configuration Using HealthBot GUI

Frequency profiles are configured and managed in the HealthBot GUI or in the HealthBot CLI. In the GUI, they are managed by navigating to the Settings > Ingest Settings page and selecting the Frequency Profile tab from the left side of the page.

Note While the sections of the frequency profile are both optional, at least one section must be filled out per frequency profile if you want the applied profile to be able to do anything.


Add a Frequency Profile

  1. Click the + FREQUENCY PROFILE button

    The Add Frequency Profile window appears.

  2. Give the profile a name such as Profile1
  3. (Optional) Click the + ADD SENSORS button.
  4. In the Sensor Name field, enter the sensor name as per the following guidelines:
    • OpenConfig Sensors: Enter the OpenConfig path for the desired sensor, such as /components or /interfaces.

    • iAgent Sensors: Enter the table name used in the sensor definition, such as ChassisAlarmTable or REutilizationTable

    • SNMP: Enter the sensor name such as npr_qmon_ext

    • BYOI: Enter <topic-name/rule-name/sensor-name>, such as topic1/rule1/sensor1

  5. In the Frequency field, enter the appropriate frequency, such as 30seconds, 1minute, 2hours, and so on.
  6. (Optional) Click the + ADD NON-SENSORS button.
  7. In the Rule Name field, enter the rule name such as check-chassis-alarms.
  8. In the Frequency field, enter the appropriate frequency, such as 45seconds, 3minutes, 1hour, and so on.

    Repeat steps 3 through 5 or 6 through 8 as desired for the profile.

    An example result of the previous steps might look like:

    Figure 33: Edit a Frequency Profile

    Edit a Frequency Profile
  9. Click the SAVE & DEPLOY button to save and deploy the profile.

    The new sensor profile is added to the list.


To edit an existing frequency profile:

  1. Click the <Profile Name> from the list.
  2. Make the needed changes as shown in the previous section.
  3. Click the SAVE button to save the profile for later deployment or the SAVE & DEPLOY button to save and deploy immediately.


To delete an existing frequency profile:

  1. Click the Trash Can icon to the right of the profile name.
  2. Click the DELETE button to delete the profile but not deploy the change or the DELETE & DEPLOY button to delete and deploy immediately.

Usage Notes:

Configuration Using HealthBot CLI

In the HealthBot CLI, you can configure the same frequency profile described above. An example of the CLI configuration needed to complete the example above looks like:

user@mgd-69ab987fbc6-pt9sh> show configuration healthbot ingest-settings frequency-profile Profile1
sensor /components {
    frequency 60seconds;
sensor /interface {
    frequency 30seconds;
non-sensor net-topic/net-rule {
    frequency 2minutes;

Apply a Frequency Profile Using the HealthBot GUI

Frequency profiles are applied to HealthBot device groups or network groups. When you create or edit a device or network group, you apply frequency profiles by selecting them from the Ingest Frequency section of the Device Group definition. Figure 34 below shows an example of frequency profiles being applied to a device group.

Figure 34: Apply Frequency Profiles

Apply Frequency Profiles

Once you have applied the needed profiles, save and deploy the device group using the SAVE & DEPLOY button.

Best Practice It is strongly recommended that you only apply frequency profiles to rules that make use of the Offset Time Unit feature.

Apply a Frequency Profile Using the HealthBot CLI

An example of a device group CLI configuration which includes a frequency profile and could be deployed in HealthBot is shown below.

user@mgd-69ab987fbc6-pt9sh> show configuration healthbot device-group lab-group
devices router1; 
ingest-frequency Profile1;

Offset Time Unit

The HealthBot offset time unit is used in conjunction with the Frequency Profiles to automatically manage time range calculations in various places within HealthBot rules. To understand the HealthBot offset function, consider the following scenario:

In HealthBot, you can define a rule which

  • Uses a sensor to gather data with a frequency of 10 seconds

  • Has a field that calculates the mean every 60 seconds

If you later decide to increase the frequency of the sensor to 60 seconds, then calculating the mean every 60 seconds would not make any sense. The result is that you would have to manually update the field calculation any time up want to change the sensor frequency.

Starting with HealthBot Release 3.0.0, you can set the time range for the mean calculation to a value of 6o, or 6offset, rather than 60s, or 60 seconds. Using an offset time value rather than a static time value tells HealthBot to automatically multiply the sensor frequency by the numeric value of the offset. Thus, any change to sensor frequency will automatically be included in the time range calculation for a formula.

An offset time unit can be used in place of standard time units in the following time range locations:

Below we discuss GUI and CLI examples of how to configure the offset time unit in each of the locations mentioned above.

Offset Used in Formulas

In this example, we are creating a rule, Rule1, with a sensor, Sensor1. The sensor frequency is set to 10 seconds.

In Figure 35 below, you can see the Fields block definition for Rule1 with the Sensors block definition framed in green. The formula, formula1, has a Time range value of 2o

Figure 35: Offset in a Formula

Offset in a Formula

A CLI formatted configuration snippet for the same field looks like:

user@mgd-97bb5d555-sw87n$ show healthbot topic external rule rule1
synopsis "This rule is used only to demonstrate various rule features and concepts";
description "Demonstration Rule";
sensor Sensor1 {
    open-config {
        sensor-name /interfaces;
        frequency 10s;
field field1 {
    constant {
        value 833;
    type integer;
field formula1 {
    formula {
        max {
            field-name "$field1";
            time-range 2o;
    type integer;

Usage Notes for Offset Used in Formulas

Offset Used in References

In this example, there are two rules in play, but only one is shown. The unseen rule, Rule1, is in the topic routing-engines and is named routing-engines (routing-engines/routing-engines). Rule1 has a frequency of 20 seconds. Rule1 is referenced .

Rule2, shown in Figure 36, is a network rule which has a reference field named ref1. The field, ref1, references back to Rule1 through the Reference XPath Expression with a Time Range setting of 3offset.

Figure 36: Offset Time Used in Reference Field

Offset Time Used in Reference

Usage Notes for Offset Used in References

Offset Used in Vectors

In this example, there are 3 rules at play. Rules Rule1 and Rule2 are not shown but are referenced by the vector.

Rule1 is in topic line-cards and is named line-cards (line-cards/line-cards) and has a frequency of 20 seconds (20s).

Rule2 is in topic routing-engines and is named routing-engines (routing-engines/routing-engines) and has a frequency of 30 seconds (30s).

In Rule3 below, we have defined a vector, vector1 that consists of 2 path references and 1 field. The vector has a Time Range defined as 3offset. Figure 37 shows the vector block definition in the HealthBot GUI.

Figure 37: Offset Time Used in Vector Block

Offset Time Used in Vector

Usage Notes for Offset Used in Vectors

Offset Used in Triggers

In this example, we have one rule, Rule1. Figure 38 below shows the trigger block definition with the sensor block definition overlaid with a green border.

The rule, Rule1, has a sensor frequency of 10 seconds (10s) applied.

The trigger itself, Trigger1, has an offset frequency of 2 (2o) applied.

The trigger term, term1, has its own time range offset of 2 (2o) applied as well.

Figure 38: Offset Time Used in Trigger Block

Offset Time Used in Trigger

Usage Notes for Offset Time Used in Triggers

Offset Used in Trigger Reference

In this example, we have 2 rules in the topic external, and one frequency profile, prof1.

The rules are:

Help us to improve. Rate this article.
Feedback Received. Thank You!

Ask questions in TechWiki

Check documentation in TechLibrary

Rating by you:      

Additional Comments

800 characters remaining

May we contact you if necessary?


Need product assistance? Contact Juniper Support