ScanCoreAPI: Difference between revisions
Jump to navigation
Jump to search
(2 intermediate revisions by the same user not shown) | |||
Line 34: | Line 34: | ||
|- | |- | ||
|class="code"|ScanCore/scan-foo/scan-foo | |class="code"|ScanCore/scan-foo/scan-foo | ||
|File (script) | |style="white-space: nowrap;"|File (script) | ||
|The <span class="code">scan-foo</span> agent itself. | |The <span class="code">scan-foo</span> agent itself. | ||
|'''Must be executable!''' | |style="white-space: nowrap;"|'''Must be executable!''' | ||
|- | |- | ||
|class="code"|ScanCore/scan-foo/scan-foo.xml | |class="code" style="white-space: nowrap;"|ScanCore/scan-foo/scan-foo.xml | ||
|File (XML) | |File (XML) | ||
|The [[strings]] specific to the <span class="code">scan-foo</span> agent. | |The [[strings]] specific to the <span class="code">scan-foo</span> agent. | ||
Line 62: | Line 62: | ||
|- | |- | ||
|class="code"|2 | |class="code"|2 | ||
|Agent failed to make a required system call. | |Agent failed to make a required system call. See log file for details. | ||
|- | |||
|class="code"|3 | |||
|Agent failed to read a critical file. See log file for details. | |||
|- | |||
|class="code"|4 | |||
|Agent failed to write to a critical file. See log file for details. | |||
|- | |- | ||
|class="code"|99 | |class="code"|99 | ||
Line 69: | Line 75: | ||
|class="code"|100 ~ 199 | |class="code"|100 ~ 199 | ||
|Reserved for Agent-specific exit codes. ScanCore treats these as "failed to run". | |Reserved for Agent-specific exit codes. ScanCore treats these as "failed to run". | ||
|- | |||
|class="code"|255 | |||
|The scan agent failed to run at all. This is usually caused by an agent written in an interpreted language failing to compile. | |||
|} | |} | ||
{{footer}} | {{footer}} |
Latest revision as of 05:11, 4 May 2015
Alteeve 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". |
255 | The scan agent failed to run at all. This is usually caused by an agent written in an interpreted language failing to compile. |
Any questions, feedback, advice, complaints or meanderings are welcome. | |||
Alteeve's Niche! | Alteeve Enterprise Support | Community Support | |
© 2025 Alteeve. Intelligent Availability® is a registered trademark of Alteeve's Niche! Inc. 1997-2025 | |||
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. |