Topology - anodot/daria GitHub Wiki
Topology pipelines are used to send data to Anodot topology API, one pipeline sends one topology entity. To create a topology pipeline run the command agent pipeline create-topology -f path/to/topology.json.
NOTICE: To be able to use topology pipelines a topology user must be created for your Anodot account. To learn how to create a topology user see the docs
Topology sources
Topology pipelines use regular agent data sources, so create a source and specify its name in the topology configuration. Currently, only directory data source that reads CSV files is supported.
Pipeline File config
| Property | Required | Value type in config file | Description |
|---|---|---|---|
source |
yes | String | Source config name |
pipeline_id |
yes | String | Unique pipeline identifier |
interval |
yes | Integer | Query data every N seconds |
entity |
yes | Array | Configuration of the topology entity |
lookups |
no | Object | Configuration of lookups |
Entiy config
| Property | Required | Type | Description |
|---|---|---|---|
type |
yes | String | Type of entity. Available topology entities are: region, site, node, cell, card, interface, link, service, application and logical_group. |
mapping |
yes | Object | Configuration of the topology entity |
Each entity is a field, to learn about fields visit the fields wiki page
Pipeline configuration example
[
{
"source": "topology_site_source",
"pipeline_id": "topology_site",
"interval": 300,
"entity": [
{
"type": "site",
"mapping": {
"id": {
"type": "variable",
"value_path": "attributes.name"
},
"parentRegionId": {
"type": "variable",
"value_path": "attributes.name",
"transformations": [
{
"type": "function",
"name": "substring",
"args": [
2,
0
]
},
{
"type": "lookup",
"name": "region",
"key": "Short Name",
"value": "Full Name"
}
]
},
"name": {
"type": "variable",
"value_path": "attributes.name"
},
"type": {
"type": "constant",
"value": "Mobile RAN"
},
"domain": {
"type": "constant",
"value": "RAN"
},
"latitude": {
"type": "variable",
"value_path": "attributes.p_lat"
},
"longitude": {
"type": "variable",
"value_path": "attributes.p_lon"
},
"address": {
"type": "variable",
"value_path": [
"attributes.street",
"attributes.house"
],
"concat_by": ", "
}
}
}
],
"lookups": {
"region": {
"type": "file",
"format": "CSV",
"path": "/home/topology/region.csv"
}
}
}
]