Telemetry Snapshots
Description |
Create a scheduled task with "save_snapshots" flag enabled |
|||||||||||
Request URL |
POST /neo/app/tasks (See code directly below) |
{
"schedule"
: {
"active"
: true
,
"timezone"
: "Asia/Jerusalem"
,
"trigger"
: "interval"
,
"startTime"
: "2019-2-18 08:04:34"
,
"endTime"
: "2019-2-28 08:06:34"
,
"intervalUnits"
: "minutes"
,
"interval"
: 10
},
"task_type"
: ""
,
"attachments"
: [],
"replacements"
: {},
"action"
: "run_cli"
,
"description"
: "Shows the running configuration of the switch"
,
"params"
: {
"arguments"
: {
"globals"
: {}
},
"commandline"
: [
"#!desc: Shows the running configuration of the switch"
,
"#!system_profile:"
,
"#!system_type: mlnxos_switch"
,
"#!update_conf: false"
,
"#!owner: *system*"
,
"show vlan"
],
"save_snapshots"
: true
### Set "save_snapshots"
: true
to collect job snapshots. ###
"snapshot_find"
: "show vlan | json-print\n\n"
,
"snapshot_replace"
: "test"
},
"target_type"
: "System"
,
"object_type"
: "System"
,
"object_ids"
: [
"10.209.36.129"
]
}
Description |
Returns a summary of all latest snapshots for each task |
|||||||||||
Request URL |
GET neo/app/tasks/snapshots/summary?latest_only=true (See code directly below) |
[
{
"snapshots"
: [
{
"start_time"
: "2019-02-19 15:50:34"
,
"affected_devices"
: [
"10.209.36.129"
]
}
],
"id"
: "task.5"
,
"devices"
: [
"10.209.36.129"
],
"description"
: "Shows the running configuration of the switch"
},
{
"snapshots"
: [
{
"start_time"
: "2019-02-18 16:27:00"
,
"affected_devices"
: [
"10.209.36.129"
]
}
],
"id"
: "show-mac-address-table-task"
,
"devices"
: [
"10.209.36.162"
,
"10.209.36.129"
,
"10.209.36.161"
],
"description"
: "Displays the MAC address table"
},
{
"snapshots"
: [
{
"start_time"
: "2019-02-19 15:04:34"
,
"affected_devices"
: [
"10.209.36.129"
]
}
],
"id"
: "task.4"
,
"devices"
: [
"10.209.36.129"
],
"description"
: "Shows the running configuration of the switch"
}
]
Description |
Returns a summary of all snapshots of task_id |
|||||||||||
Request URL |
GET /neo/app/tasks/snapshots/summary?task_ids=<task_id> GET neo/app/tasks/snapshots/summary?task_ids=show-mac-address-table-task (See code directly below) |
[
{
"snapshots"
: [
{
"start_time"
: "2019-02-18 16:26:00"
,
"affected_devices"
: [
"10.209.36.129"
,
"10.209.36.162"
,
]
},
{
"start_time"
: "2019-02-18 16:27:00"
,
"affected_devices"
: [
"10.209.36.129"
]
}
],
"id"
: "show-mac-address-table-task"
,
"devices"
: [
"10.209.36.162"
],
"description"
: "Displays the MAC address table"
}
]
Description |
Returns the latest snapshot for each device |
|||||||||||
Request URL |
GET neo/app/tasks/<task_id>/snapshots GET neo/app/tasks/show-mac-address-table-task/snapshots (See code directly below) |
{
"late_snapshot_time"
: "2019-02-18 16:27:00"
,
"total_devices"
: 3
,
"snapshots"
: [
{
"system_ip"
: "10.209.36.162"
,
"system_name"
: "r-ufm-sw75"
,
"snapshot"
: "snapshot_2019-02-18_16-26-00_2019-02-18_16-26-07"
,
"snapshot_time"
: "2019-02-18 16:26:00"
,
"system_type"
: "Mellanox Switch"
}
]
}
Description |
Returns latest snapshots of the time until the time provided for each device |
|||||||||||
Request URL |
GET neo/app/tasks/<task_id>/snapshots?at=2019-02-18 16:26:00 GET neo/app/tasks/show-mac-address-table-task/snapshots?at=2019-02-18+16%3A26%3A00 (See code directly below) |
{
"latest_snapshot_time"
: "2019-02-18 16:26:00"
,
"total_devices"
: 3
,
"snapshots"
: [
{
"system_ip"
: "10.209.36.161"
,
"system_name"
: "r-ufm-sw74"
,
"snapshot"
: "snapshot_2019-02-18_16-26-00_2019-02-18_16-26-07"
,
"snapshot_time"
: "2019-02-18 16:26:00"
,
"system_type"
: "Mellanox Switch"
}
]
}
Description |
Returns the content of the snapshot |
|||||||||||
Request URL |
GET neo/app/tasks/<task_id>/snapshots/<system_ip>/<snapshot> GET neo/app/tasks/show-mac-address-table-task/snapshots/10.209.36.162/snapshot_2019-02-18_16-26-00_2019-02-18_16-26-07 (See code directly below) |
{
"content"
: "show vlan | json-print\n\n{\n \"1\": [\n {\n \"Name\": \"default\",\n \"Ports\": \"Eth1/1, Eth1/2, Eth1/3, Eth1/4, Eth1/5,Eth1/6, Eth1/7, Eth1/8, Eth1/9, Eth1/10,Eth1/11, Eth1/12, Eth1/13, Eth1/14, Eth1/15,Eth1/16\"\n }\n ],\n \"555\": [\n {\n \"Name\": \"five\",\n \"Ports\": \"\"\n }\n ],\n \"666\": [\n {\n \"Name\": \"six\",\n \"Ports\": \"\"\n }\n ]\n}\n"
}
Description |
Returns a snapshot list of a specific device |
|||||||||||
Request URL |
GET neo/app/tasks/<task_id>/snapshots/<system_ip> GET neo/app/tasks/show-mac-address-table-task/snapshots/10.209.36.129 (See code directly below) |
[
"snapshot_2019-02-18_16-26-00_2019-02-18_16-26-07"
,
"snapshot_2019-02-18_16-27-00_2019-02-18_16-27-07"
]