diff options
| author | slinderud <simen.linderud@gmail.com> | 2023-04-05 19:52:03 +0200 |
|---|---|---|
| committer | slinderud <simen.linderud@gmail.com> | 2023-04-05 19:52:03 +0200 |
| commit | 1039acac579c185fbddf5ab6cfce2b9f37806c7e (patch) | |
| tree | b1a6a2d7b968fb3af326b92927ef0e49d6f49404 /tools/oxidized/oxidized.j2 | |
| parent | 1e83fed0a29559bfb019b93101a368d4606e7d98 (diff) | |
init oxidizedoxidized-tools
Diffstat (limited to 'tools/oxidized/oxidized.j2')
| -rw-r--r-- | tools/oxidized/oxidized.j2 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/oxidized/oxidized.j2 b/tools/oxidized/oxidized.j2 new file mode 100644 index 0000000..df15b7d --- /dev/null +++ b/tools/oxidized/oxidized.j2 @@ -0,0 +1,13 @@ +{% set mgmt = objects["read/switches-management"].switches %} +{% set ping = objects["public/ping"].switches %} +{% set switches = objects["public/switches"].switches %} +[ +{% for switch, state in ping.items() if state.latency4 is not none and not "server" in switches[switch].tags%} + { + "hostname": "{{ mgmt[switch].sysname }}.tg23.gathering.org", + "os": "junos", + "ipv4": "{{ mgmt[switch].mgmt_v4_addr }}", + "ipv6": "{{ mgmt[switch].mgmt_v6_addr }}" + }{% if not loop.last -%},{% endif %} +{%endfor%} +] |
