ScanCoreAPI

From Alteeve Wiki
Jump to navigation Jump to search

 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 Note
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. Must be executable!
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).
2 Agent failed to make a required system call. See log file for details.
3 Agent failed to read a critical file. See log file for details.
4 Agent failed to write to a critical file. See log file for details.
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.