Example Configuration: OSPF Resource and Dependency
Before you begin configuring the OSPF resource and dependency, you must deploy the following configurations:
Sub-interface as a resource with interface-name and sub-interface index as key properties.
Routing options as a resource with router-id as a key property.
The example configurations create OSPF protocol dependency between two devices. The OSPF protocol runs on an interface between two devices. So, the protocol forms two types of dependencies in the example configuration. The first dependency is between OSPF and the device, known as Local Device and Network dependency in the configuration. The second dependency is between OSPF protocol and the remote device, known as Other Devices dependency in the configuration. Paragon Insights establishes the two dependencies using the following properties in device 1 and device 2 as shown in Figure 1.
The sub-interface properties and OSPF interface names are used to create local dependency between a local device and the OSPF session at one end and between the remote device and the OSPF session at the other end.
The neighbor ID, designated router address and the device's router ID are used to create device-to-device (Other Device) dependency.
FIGURE2 shows how the iteration in locate resource configurations creates the device-to-device dependency.
To configure OSPF resource and its dependencies:
- Select Configuration > Resources.
The Resources page appears.
- Select OSPF resource from the Resources table and click
edit (pencil icon).
The Edit Resource page appears.
- Enter the details as described in Table 1.
Table 1: Fields of Properties in OSPF Resource Configuration Field
Description
General Information
A resource, like rules, is defined under the topic hierarchy.
Resource Name
Enter ospf.
The name can follow the regular expression pattern: [a-zA-Z][a-zA-Z0-9_-]* and can have up to 64 characters.
For example, the name can also be Ospf-1.
Topic
Select protocol.
Description
Enter a short description of OSPF dependencies.
Property Designated Router Address
Properties are characteristics such as name, MTU, neighbor-id etc. of a particular resource. A property of one resource can be matched with the property of another resource to establish dependency.
Property name
Enter dr-address.
The name can follow the regular expression pattern: [a-zA-Z][a-zA-Z0-9_-]* and can have up to 64 characters.
Property type
Select String.
Add as a key
Not applicable.
If you enable a resource property as key, Paragon Insights uses this property to uniquely identify multiple instances of that property as a resource. You can mark more than one property as key.
For example, in interface property that uses the interface name as a key, Paragon Insights identifies ge-0/0/1, ge-1/2/0, ge-1/0/0 as unique instances of the interface resource.
Source Configuration
Rules and fields are the sources from which Paragon Insights discovers a resource property.
Rule Name
Select protocol.ospf/check-ospf-neighbor-information.
Field Name
Select dr-address.
Property Interface Name
Properties are characteristics such as name, MTU, neighbor-id etc. of a particular resource. A property of one resource can be matched with the property of another resource to establish dependency.
Property name
Enter interface-name.
The name can follow the regex pattern: [a-zA-Z][a-zA-Z0-9_-]* and can have up to 64 characters.
Property type
Select String.
Add as a key
Enable this option.
If you enable a resource property as key, Paragon Insights uses this property to uniquely identify multiple instances of that property as a resource. You can mark more than one property as key.
For example, in interface property that uses the interface name as a key, Paragon Insights identifies ge-0/0/1, ge-1/2/0, ge-1/0/0 as unique instances of the interface resource.
Source Configuration
Rules and fields are the sources from which Paragon Insights discovers a resource property.
Rule Name
Select protocol.ospf/check-ospf-neighbor-information.
Field Name
Select interface-name.
Property Neighbor ID
Properties are characteristics such as name, MTU, neighbor-id etc. of a particular resource. A property of one resource can be matched with the property of another resource to establish dependency.
Property name
Enter neighbor-id.
The name can follow the regular expression pattern: [a-zA-Z][a-zA-Z0-9_-]* and can have up to 64 characters.
Property type
Select String.
Add as a key
Enable this option.
If you enable a resource property as key, Paragon Insights uses this property to uniquely identify multiple instances of that property as a resource. You can mark more than one property as key.
For example, in interface property that uses the interface name as a key, Paragon Insights identifies ge-0/0/1, ge-1/2/0, ge-1/0/0 as unique instances of the interface resource.
Source Configuration
Rules and fields are the sources from which Paragon Insights discovers a resource property.
Rule Name
Select protocol.ospf/check-ospf-neighbor-information.
Field Name
Select neighbor-id.
- Click Next twice to go to the Dependency page.
The Dependency page appears.
- Click + in the Dependency page.
A new Resource section appears.
- Enter the details as described in Table 2.
Table 2: Local Device and Network Dependency Configuration Field
Description
OSPF depends on
Resource Name
Select interfaces/sub-interfaces.
Add Terms (Terms > Add Item)
Terms contain the logic to check for a dependency relation between resources.
Term Name
Enter ifl-dependency
The name follows the [a-zA-Z][a-zA-Z0-9_-]* pattern.
Depends on Multiple Instances
Enable this option.
Paragon Insights checks with multiple instances of the property interface name and the property sub-interface index configured in resource sub-interface.
Dependency Type
Select Local Device & Network.
See Understand Resources and Dependencies for more information on dependency types.
Add Variable
Name: Enter ospf-interface-split.
Expression: Enter (.*)\.(\d+)
Field: Enter $interface-name.
Locate Resource
Iterates over all instances of the interfaces and the sub-interface index in resource sub-interfaces to find local dependency.
Resource Name
Select interfaces/sub-interfaces
Label As
Enter ifl.
Paragon Insights stores each instance of the interface resource to check for dependency.
Conditions
Conditions in Locate Resource are used to identify if the selected resource is the correct one or not. If the condition does not match a particular instance, Paragon Insights picks the next instance and checks for the condition. This continues until we get an instance where the condition matches, or all the instances of the resource are exhausted.
The first condition checks for a match between the OSPF resource’s interface property and the interface resource’s interface instances.
In the left-hand side (LHS), select $ospf-interface-split-1.
Select matches-with as operator.
In the right-hand side (RHS), select $ifl:interface-name.
Click + to add a second condition that checks for a match between the OSPF interface’s sub-interface index and the resource sub interface’s sub-interface index.
In the LHS, select $ospf-interface-split-2.
Select matches-with as operator.
In the RHS, select $ifl:sub-interface-index.
- Click Save.
The Edit Resource page appears.
You can find the new term in Terms section. The OSPF's interface name and interface sub-index is checked against the sub interface resource's interface name and sub-index. When Paragon Insights finds a match, the interface from the OSPF resource monitored in a device forms a local dependency with the interface from the interface resource of the same device.
- Click + in the Terms section.
You can add a second term to configure Other Device dependency for OSPF resource.
- Enter the details as described in Table 3.
Table 3: Other Device Term Configuration Field
Description
Add Terms (Terms > Add Item)
Terms contain the logic to check for a dependency relation between resources.
Term Name
Enter ifl-remote-dependency.
The name must follow the [a-zA-Z][a-zA-Z0-9_-]* pattern.
Dependency Type
Select Other Device dependency.
See Understand Resources and Dependencies for more information on dependency types.
For Every Device
Selects a device from a list of devices in device groups.
Label As
Enter remote-device.
The name follows the [a-zA-Z][a-zA-Z0-9_-]* pattern.
Locate Resource
Define condition to check if the local device’s OSPF neighbor-id is the remote device’s router-id.
Resource Name
Enter remote-device:protocols/routing-instance.
Label As
Enter remote-routing-instance.
Conditions
Conditions in Locate Resource are used to identify if the selected resource is the correct one or not. If the condition does not match a particular instance, Paragon Insights picks the next instance and checks for the condition. This continues until we get an instance where the condition matches, or all the instances of the resource are exhausted.
In the LHS, select $neighbor-id.
In the operator field, select matches-with.
In the RHS, select $remote-routing-instance:router-id.
Locate Resource
Use resource Routing Instance to collect router-id of the local device.
Resource Name
Enter protocol/routing-instance.
Label As
Enter label name as local-routing-instance.
Locate Resource
Define condition to check if the remote device’s OSPF neighbor-id matches with the router-id of the local device.
Resource Name
Enter remote-device: protocols/ospf.
Label As
Enter remote-ospf.
Conditions
Conditions in Locate Resource are used to identify if the selected resource is the correct one or not. If the condition does not match a particular instance, Paragon Insights picks the next instance and checks for the condition. This continues until we get an instance where the condition matches, or all the instances of the resource are exhausted.
In the LHS, enter $local-routing-instance:router-id.
In the operator field, select matches-with.
In the RHS, enter $remote-ospf:neighbor-id.
Click + to add a second condition that checks for a match between local device OSPF’s designated router address and remote OSPF’s designated router address.
In the LHS, enter $dr-address
In the operator field, select matches-with.
In the RHS, enter $remote-ospf:dr-address
Locate Resource
Define a condition to check if interface name and sub-index in the remote OSPF matches with interface name and sub-index of the remote device’s interface.
Resource Name
Enter remote-device: interfaces/sub-interface.
Label As
Enter remote-ifl.
Conditions
Conditions in Locate Resource are used to identify if the selected resource is the correct one or not. If the condition does not match a particular instance, Paragon Insights picks the next instance and checks for the condition. This continues until we get an instance where the condition matches, or all the instances of the resource are exhausted.
The first condition checks for a match between remote OSPF resource’s interface property and remote interface resource’s interface instances.
In the LHS, select $ospf-remote-interface-split-1.
Select matches-with as operator.
In the RHS, select $remote-ifl:interface-name.
Click + to add a second condition that checks for a match between remote OSPF interface’s sub interface index and remote interface instance’s sub interface index.
In the LHS, select $ospf-remote-interface-split-2.
Select matches-with as operator.
In the RHS, select $remote-ifl:sub-interface-index.
- Click Next.
You can see a collapsed view of the resource and the dependency configuration you added.
- (Optional) Click View JSON to preview the JSON format of the configuration.
- Click Save & Exit.
The Save Resource Configuration dialog appears.
Do one of the following:
Click Save and Deploy.
Paragon Insights saves and deploys the configuration to generate smart alarms.
Click Save.
Paragon Insights saves the configuration but does not generate smart alarms based on the new resource and dependency configuration you add.
You can see the OSPF resource and its dependency in the visual panel of the Resources page.