Daemon - infer (an interface to Jess)

Fist available: iPAM 2.3

Very Experimental - Subject to change

To use this agent you must have the component PAMSmart.jar in your classpath and you must download and build Jess. Send email to cda@mitre.org for more information on how to use this.

Background

The Java Expert System Shell (Jess) has been used to develop an iPAM daemon that can monitor and control iPAM configurations. Jess syntax will not be described here. This document describes the syntax of several Jess "userfunctions" that provide the interface between iPAM and Jess.

With this capability "smart" configurations can be built that

This experimental daemon is not for the faint of heart. A rule-based production system has its own syntax and nuances. The coupling of iPAM with a rule-based production system allows iPAM to "respond" to its environment and "reconfigure" its agents, connections, and schedules.

The user functions below (addons to Jess's basic functionality) allow Jess rules to be written that can monitor attributes on any of iPAM's agents. iPAM agent attributes become "reflected" as dynamically updated Jess facts. Jess rules can respond to changes in facts dynamically. Special Jess user-functions allow you to create, modify, delete, connect, and reconnect iPAM agents from Jess. Other user functions allow messages to be entered into the log file or to be sent via email.

* Jess and all related documenation can be found at http://herzberg1.ca.sandia.gov/jess/

 

Syntax

Making assertions about iPAM agents

(assertAgent <agent-id>) - reflects a specific agent's attributes into the Jess fact-base

(assertAgent) - just asserts the deftemplate

(assertAgentOfKind <agent-kind>)

(assertAllAgents)

(assertAgentAndConnections)

(assertReportAgent <agent-id> ) - special treatment to multivalued memento attributes with names that start with "user_"

Removing iPAM agent assertions

(retractAgent <agent-id>)

Creating new agents

(editAgent <agent-id> createOfType <agentType>)
Note that agent id's must be unique

(buildUniqueAgent <agentKind> [agentNamePrefix] )

- a user function that creates an agent of type agentKind. Has an optional with a name prefix of agentNamePrefix. Returns the agent id of the created agent if successful otherwise FALSE.

Destroying an agent along with all of its connections

(editAgent <agent-id> destroy)

Working with agent properties

(editAgent <agent-id> removeProperty <propertyName>)

(editAgent <agent-id> setProperty <propertyName> <propertyValue>)

Working with agent connections

(editAgent <agent-id> connectOutputTo <other-agent-id>)

(editAgent <agent-id> disconnectOutputTo <other-agent-id>)

Send a message via email

(sendMail <msg> <subject> <to> <from> <smtp-server>)

Write to the iPAM log file

(writeToLog <type> <msg>) - type is "warning" or "log"

Activate an agent as soon as possible

(editAgent <agent-id> activateASAP)

Determine if an agent exists

(agentExists <agent-id>)

Others

(addTimer <propertyTimer-agent-id> <timed-element-name> <triggerDate> <list-of-elements>)
 
Arguments:
propertyTimer-agent-id: A string or atom
timed-element-name: A string or atom
triggerDate: A number which is the activation time in seconds
list of elements: Multivalued (atoms, strings, or numbers)
Description:
list-of-elements are set as multivalued memento attribute value in the named PropertyTimer daemon with the attribute name "user_alarm." concatenated with the time-element-name.
Returns:
Boolean
 
(dump-facts file-name)
 
Arguments:
A filname
Description:
Save all Jess facts to a file with the same format facts command (i.e., prefixes each fact with its fact id), which is useful for debugging in concert with the "watch rules" command to determine which rules fired against which facts.
Returns:
Boolean

 

Last Updated: 27 September 1999