ScanCoreAPI: Difference between revisions

From Alteeve Wiki
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:


This is the API for writing "Scan Agents" for the [[ScanCore]] alert system.
This is the API for writing "Scan Agents" for the [[ScanCore]] alert system.
= Conventions =
The term "'''should'''" indicates a recommended but optional implementation scheme.
The term "'''must'''" indicates a required implementation scheme.
= Agent File Name =
All agents must be stored under the directory '<span class="code">ScanCore/agents/</span>. Each agent '''should''' be in it's own subdirectory, named after the agent itself. The agent's name '''must''' start with "<span class="code">scan-</span> followed by a descriptive name that would allow a reader to determine the purpose of the agent. Additional data, like an [[XML]] "[[strings]]" file and [[SQL]] "[[schema]]" file '''should''' have the file names <span class="code">scan-foo.xml</span> and <span class="code">scan-foo.sql</span>, respectively.
Example:
{|class="wikitable"
!File
!Type
!Purpose
|-
|class="code"|ScanCore/
|Directory
|The directory where <span class="code">ScanCore</span> is installed.
|-
|class="code"|ScanCore/scan-foo/
|Directory
|The directory where the <span class="code">scan-foo</span> agent is installed.
|-
|class="code"|ScanCore/scan-foo/scan-foo
|File (script)
|The <span class="code">scan-foo</span> agent itself.
|-
|class="code"|ScanCore/scan-foo/scan-foo.xml
|File (XML)
|The [[strings]] specific to the <span class="code">scan-foo</span> agent.
|-
|class="code"|ScanCore/scan-foo/scan-foo.sql
|File (SQL)
|The SQL [[schema]] that will be loaded into the ScanCore databases and then used by the <span class="code">scan-foo</span> agent to record information about 'foo' system it monitors.
|}


= Agent Exit Codes =
= Agent Exit Codes =

Revision as of 19:02, 3 May 2015

 AN!Wiki :: ScanCoreAPI

Warning: This is *very* much a work in progress and not at all stable or finalized.

This is the API for writing "Scan Agents" for the ScanCore alert system.

Conventions

The term "should" indicates a recommended but optional implementation scheme.

The term "must" indicates a required implementation scheme.

Agent File Name

All agents must be stored under the directory 'ScanCore/agents/. Each agent should be in it's own subdirectory, named after the agent itself. The agent's name must start with "scan- followed by a descriptive name that would allow a reader to determine the purpose of the agent. Additional data, like an XML "strings" file and SQL "schema" file should have the file names scan-foo.xml and scan-foo.sql, respectively.

Example:

File Type Purpose
ScanCore/ Directory The directory where ScanCore is installed.
ScanCore/scan-foo/ Directory The directory where the scan-foo agent is installed.
ScanCore/scan-foo/scan-foo File (script) The scan-foo agent itself.
ScanCore/scan-foo/scan-foo.xml File (XML) The strings specific to the scan-foo agent.
ScanCore/scan-foo/scan-foo.sql File (SQL) The SQL schema that will be loaded into the ScanCore databases and then used by the scan-foo agent to record information about 'foo' system it monitors.

Agent Exit Codes

Return Code Reason
0 Agent successfully scanned one or more devices.
1 Agent did not find anything to scan (hardware not found or application not installed/found).
99 Agent exited with an undefined exit code. This is interpreted as a broken agent.
100 ~ 199 Reserved for Agent-specific exit codes. ScanCore treats these as "failed to run".


 

Any questions, feedback, advice, complaints or meanderings are welcome.
Alteeve's Niche! Enterprise Support:
Alteeve Support
Community Support
© Alteeve's Niche! Inc. 1997-2024   Anvil! "Intelligent Availability®" Platform
legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions.