Defining File Observer jobs
Using the File Observer functionality, you can write bespoke data to a file in a specific format, upload this data to the topology service, and then visualize this data as a topology view in the Agile Service Manager UI. The File Observer is installed as part of the core installation procedure.
file_observer_common.sh
- The config file you use to customize the File Observer job unique_id or service host.
The File Observer runs a 'loadFile' job that loads all requested topology data for each tenant. The loadFile job takes the name of the file to parse and load.
Lines starting with V:
(vertex), E:
(edge), D:
(delete) or W:
(wait) are treated as instruction lines to be processed. Other
lines, for example lines that are empty or commented out, are ignored.
- V:
- The JSON payload takes the format described in the swagger documentation of the
POST /resources
message body. - E:
- The JSON payload takes the format described in the swagger documentation for the
_references
section of thePOST /resources
message body. - W:
- Takes an integer period followed by a string specifying the units.
- D:
- Takes a single string which is the unique ID of the vertex to delete.
- An example file is available in the $ASM_HOME/data/file-observer directory.
- See the related links for more information on available timestamps formats.
Files to be read by File Observer must be located in the following directory: $ASM_HOME/data/file-observer
A file name specified in a File Observer job must be relative to that directory (and not absolute).
curl -u PROXY_USER[:PROXY_PASSWORD] -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'X-TenantID: cfd95b7e-3bc7-4006-a4a8-a73a79c71255' -d '{ "unique_id": "dncim.file", "type": "load", "parameters": { "file": "dncim.file" } }' https://localhost/1.0/file-observer/jobs
- file_observer_load_stop.sh
- Stops the job
- file_observer_job_list.sh
- Lists the current job status
- file_observer_log_level.sh
- Sets the log level