Object Monitor Nodes

From PresenceWiki
Jump to: navigation, search

Objmon.png

The Object Monitor allows you to monitor abstract files and folders on a company LAN, WAN, Intranet, FTP Server or the Internet. This expands the monitoring scope of Presence to incorporate files and folders such as web pages, office documents, log files, directory contents and so on.

The Object Monitor uses standard URL naming conventions to access your resources. It can monitor folders or files for changes in content and report those changes in various ways. You can specify search keywords at many levels, and have Presence notify you of changes in files containing only these search words.

The ability to do abstract file monitoring opens up all types of simple publishing abilities.

There are a lot of options in the Object monitor, which should make it flexible enough to monitor most events.

Example 1: Monitoring in Practice

You want to automatically tell all your customers about a new product, update, service or content that has been placed on your web site.

First we would need a database of customers to tell - for example use an SQL Statement and create a query for those email addresses that you require to be notified.

Second you would create an Object Monitor that monitors for content or files changes on you web site.

Lastly you would use the Send Email Action to send the content. Three simple steps, no programming!

See below diagram for the setup.

Note how we are bringing together traditionally non-compatible data sources - SQL data and web data - to provide a fully integrated solution to a business problem.

Image183.png

Create An Object Monitor

To create a new Object Monitor first select the Category in the Task Explorer then right click anywhere in the Data Access List, and Select Create New Object Monitor.

The following dialog will be shown:

Image185 80.png

Info Tab

Name - Name the Object Monitor, this name will appear in the Object Monitor node list for the chosen Category.

Description - A clear description of precisely what the Object Monitor does will make it easier to maintain in future by yourself and others.

Type of Monitor

There are three types of connections for Object Monitors, these are as follows:


Local Network Navigator

Typically you would want to monitor a local file system such as a Windows Folder or file, this could even monitor the folders of an Intranet server.

Select the file or directory you want to monitor using a familiar browser.

Internet Navigator

Used for monitoring web sites and pages on the Internet or an Intranet.

Standard Tab Document Location -

The URL e.g. http://www.international-presence.com

If you are connecting to a server that requires password authentication check this box and provide the Username and Password information in the required fields.

Advanced Tab

When a web site requires dynamic details it is possible to provide these details with GET and POST methods in name values pairs. First you need to understand what type of method to use;

The POST method is an invisible set of values, these are normally used on forms and where data may be sensitive.

The GET method differs in that the values are formatted into the URL and are visible.

You need to check what kind of method is needed by doing a manual page request and examine the URL.

e.g. http://www.buyitonline.com/item/select.jsp?productid=the_big_slipper&cat=footwear uses a GET

The name of the dynamic value e.g. productid

The value of the dynamic value e.g. the_big_slipper

FTP Navigator

Select the FTP Resource and directory from the Presence FTP Browser. See FTP Connections for instructions on how to create an FTP Resource.

Used for connecting to and monitoring files on an FTP server.

Search Options - The Monitor Tab

Image192 80.png

The options on this tab will change depending on the type of object being monitored (file,web,ftp).

Limit URLS- If checked you will need to provide the maximum number of links that we will examine, i.e. the links that we will consider adding to our list. Or in other words, the number of files that we are prepared to open and inspect for links.

Follow links - If this is checked then the Object Monitor will look for links in the current page and then monitor them and their links and so on. An offsite link is one where the root is from a different site. So if the path is http://www.presencebmp.com and we aren't allowing offsite links then:-

href="/info/aboutus.htm" and href="http://www.presencebmp.com/sample/part1.htm" would be allowed

but href="http://www.international-presence.com/companies.html" would not be

Search sub-folders - If checked you will need to provide a number for the maximum depth from the original URL. The root URL is always considered to be at depth level 1. For example, if the root URL contains links to another five URL's, then each of these URL's are considered to be at depth level two. If other URL's are found within these five URL's then they will be at depth level 3 and so on. Obviously the greater the depth you allow the more links you will potentially have to investigate, up to the limit proposed by the Limit URLS setting.

Extensions allows you to specify which files you will be returned. If the site is an internet location, then there is also an options to set which files will be searched These fields are comma-separated list to allow you to specify multiple items.

Only Monitor URL's that contain - If checked the Object Monitor Search engine will look in the items name/content for keywords and will only return those that have one of the keywords mentioned. Use commas between each for multiple keywords.

The options are as Follows:

Find Condition:-

All - all keywords must be found in the comma separated list

At least one - at least one of the keywords must be found from the comma separated list

None - The comma separated list should contain values that indicate you don't want this file/content.

Search For:-

Comma separated list- A comma separated list of phrases, keywords, etc.

In Location:-

URL Name - Search the actual URL, i.e. the file name, folder name, domain name, etc.

Content - Search the complete content of the URL for the search parameters.

<html> Tag Options for Code Searches - Searches the information that is contained between '<' & '>' tags.

>text< Content only Search - Will only search for data that is outside the normal Code tags for internet pages.

Alert Options - The Deviation Tab

Files

Image194.jpg

The Object Monitor has it's own separate Deviation Engine. Unlike with SQL and XML queries, you do not need to create a separate Data Filter node to configure the filtering.

This allows the Object Monitor to report changes to a fine grain level. At the highest level you can report on simple changes like files being added, removed, etc. At the lowest level you can detect changes in content such a word changing e.g. the words 'Big Slipper' change to 'Big Slippers', the deviation engine can show that 'Slipper' change to 'Slippers'. See below options for more information on the change detection types.

Trigger when a file is Added - A result will be created for added files.

Trigger when a file is Removed - A result will be created for files that no longer can be found.

Trigger when a file is Older than - A result will be created for files that are older than the (Days) and (Hours) spinners.

Trigger when a file is Modified - In this group of options we are able to specify a much lower level of content monitor.

Types of events monitored by modified

Added Tab - A result will be created for text that has been added to files.

Removed - A result will be created for text that has been removed from files.

Changed From - A result will be created for text that has been changed from one value to another.

Changed To - A result will be created for text that has been changed to one value from another.

Moved To - A result will be created for text that has been relocated in a file.

The criteria for these events is defined much the same way as on the Monitor tab, but here it is important to understand the distinction. We are saying, monitor the files for added content and report when the added content contains.

Find Condition:-

All - all keywords must be found in the comma separated list

At least one - at least one of the keywords must be found from the comma separated list

None - The comma separated list should contain values that indicate you don't want this file/content.

Search For:-

Comma separated list- A comma separated list of phrases, keywords, etc.

In Location:-

URL Name - Search the actual URL, i.e. the file name, folder name, domain name, etc.

Content - Search the complete content of the URL for the search parameters.

<html> Tag Options for Code Searches - Searches the information that is contained between '<' & '>' tags.

>text< Content only Search - Will only search for data that is outside the normal Code tags for internet pages.

Folders

Image196.jpg

Trigger when a folder is Added - A result will be created for added folders.

Trigger when a folder is Removed - A result will be created for folders that no longer can be found.

Trigger when a folder is Older than - A result will be created for folders that are older than the (Days) and (Hours) spinners.

Output Options

Just like the SQL and XML queries the Object monitor can output results, these result differ in the fact that there is a limited set of fields available for output, however these fields contain dynamic content. The values are just like the result set you would get from an SQL Query or XML Query and can be taken in to a task and formatted in various ways.

Image198.jpg

Depending on the types of options you selected on the Deviation Tab the following types of information can be reported:

Root URL - This is the starting point specified on the Path field in the Monitor Tab, the returned value will always be the same.

Description - If the file has a description such as HTML header this will be returned in this field.

Summary - This will return a Summary of what the Object Monitor is monitoring, this is very useful when providing alerts as is describes what is being monitored.

URL - This will return a file Name, HTML page or Folder name, it's dependent on the type of monitor specified on the Monitor Tab.

Change Type - This will return a Changed, Moved, Added or Deleted flag.

Directory - If the file is a Directory this will return a Boolean value of true, for files and pages it will return false.

Modified Content Type - This will return a Changed, Moved, Added, Deleted, Changed From, Changed To or Aged flag.

Modified Content Added - This will return the content that has been added.

Modified Content Removed - This will return the content that has been removed.

Modified Content Changed from - This will return the content that has been changed from one value to another value

Modified Content Changed to - This will return the content that has been changed from one value to another value, much like the above option.

Modified Content Moved - This will return the content that has been move from one place to another in the same file.

Complete Content - This will return the complete contents of the file.

To include any of the above columns in your output simply drag an item from the left to the right panel.

Move Up Button- Use this button to move the currently selected column up the pick list. Field names listed at the top will appear nearer to the left in the column list when your query results are returned.

Move down Button- Use this button to move the currently selected column down the pick list. This has the effect of formatting the column closer to the right when the results are returned in a selected message.

Remove Column Button- Use this button to remove the selected column from the pick list.

One row per url - Select this option to return a row base list

Multi rows if required - Select this option if you want to group

Testing the Object Monitor

As with all the Query tools in Presence, the object monitor can test the validity of the query and show sample results. The comparison/deviation of these results is stored so as to prime the deviation data. So, if you were to run the same test twice the results will differ because the first test run primed the database with the comparison data. The comparison data is stored against each task, if the Object Monitor is being tested in isolation of a Task (from the Data Access list) then a comparison set is only created for the Object Monitor and not against a task.

Image200.jpg

Results Tab

The results shown in the Test are based on the Output types selected on the Previous Tab. See the Output Tab for an explanation of the types that can be reported.

Clear Button - Pressing this Button will clear the currently displayed table(if any).

Clear Base Data Button - Pressing this button will Delete the deviation data for either the singular Object Monitor(from the Data Access list) or the Object Monitor and Task combination.

Test Button - Pressing this button will perform the Object query, the following dialog is shown.

Image202.jpg

Start Button - Start the test by actually connecting to and querying the URL, this may take some time depending upon the limiting factors you setup in Monitor Tab.

Stop Button - The Start Button will change to a Stop Button when the query is being performed.

Okay Button - This button will be enabled when the query is complete. Pressing this button will show the test results in the background table.

Cancel Button - Pressing this Button will close the dialog.

During the test the URL's being queried will be displayed in the list. Monitor Tab

Image204.jpg

The Monitor Tab will show a list of the URLs being monitored, this is not populated until the test has been run. Summary Tab

Image206.jpg

The Summary Tab will show a written easy to understand summary of the Object Monitor.

Example 2: Monitoring file content for changes

As well as monitoring folders and file structures to see for instance if a file has been added it is also possible to monitor the actual content of the files for changes.

Say we have a folder that we are scanning in the Object Monitor:-

Explorer.png

This will return the files:-

Monitor.png

Say the files contain text along the lines of:-

Status1.png

which may later get changed to:-

Status2.png

when the item is sold.

To create output when the sold is added to the file we would set the following:-

Deviateadded.png

If we want to be notified when either the actioned status changes to false then we add the following:-

Deviatefrom.png

Deviateto.png

Once this file changes, we will get the following output:-

Output.png

If we look at the individual fields here, then we can see the reason why it's triggered.

Although any of the 3 events (change from - change to - added) would've triggered output.

Changedadded.png

Changedfrom.png

Changedto.png

Notice that the actual change is highlighted in yellow but we have returned some of the words around the change to give it context.

The amount of words returned with the change can be controlled via the options button in the output table:-

Words.png


See Also

Task Elements : Data Accesss Task Elements : Object Monitor Nodes

SQL Statement Nodes | Object Monitor Nodes | XML Query Nodes | Mail Scanner Nodes
Web Services Nodes | LDAP Query Nodes | JSON Node | Flat File Parser | Data Table Nodes | Variable Nodes
Transaction Control Nodes | Context XML Nodes


Task Elements | Resources