Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Michael Schoen NWMichl

🏠
Working from home
View GitHub Profile
@NWMichl
NWMichl / apic_query.py
Created Feb 15, 2021
Query the Cisco ACI APIC API using Python & requests
View apic_query.py
import requests, json
apic_url = 'sandboxapicdc.cisco.com'
apic_username = 'admin'
apic_password = 'ciscopsdt'
def apic_login(apic: str, username: str, password: str) -> dict:
""" APIC login and return session cookie """
apic_cookie = {}
credentials = {'aaaUser': {'attributes': {'name': apic_username, 'pwd': apic_password }}}
@NWMichl
NWMichl / grafana_ping_panel.json
Created Jan 10, 2021
Grafana panel idea to visualize Telegraf inputs.ping metrics, a nice alternative to Smokeping.
View grafana_ping_panel.json
{
"aliasColors": {},
"dashLength": 10,
"datasource": "InfluxDB",
"fieldConfig": {
"defaults": {
"custom": {},
"links": []
},
"overrides": []
@NWMichl
NWMichl / syslog_nxos.yml
Last active Dec 14, 2020
A declarative Ansible playbook to manage Cisco NX-OS syslog server configuration
View syslog_nxos.yml
# Syslog configuration with Cisco NX-OS devices
#
# Usage: ansible-playbook -k -u <cli_user> syslog_nxos.yml
# Specify the syslog servers in the 'vars:' section of the playbook header.
---
- name: Ensure desired state - syslog server
hosts: all
gather_facts: false
connection: network_cli