I need to update the IP address of the syslog servers in approx 300 sites. Everything I have tried so far has been unsuccessful. I've tried using Python: import meraki
API_KEY = 'xxxxxxxxxx'
dashboard = meraki.DashboardAPI(API_KEY)
network_id = ['NID1', 'NID2', ....]
for network in network_id:
servers = [{'host': '10.46.99.2', 'port': 514, 'roles': ['Wireless event log', 'URLs', 'Flow', 'Security events', 'Appliance event log']}]
response = dashboard.syslog_servers.updateNetworkSyslogServers(
network_id, servers
)
print(response) But I get this error: File "syslogUpdater.py", line 14, in <module>
response = dashboard.syslog_servers.updateNetworkSyslogServers(
AttributeError: 'DashboardAPI' object has no attribute 'syslog_servers' Also tried using curl: #!/bin/sh -x
for i in `cat networkIds.txt`; do
curl -L --request PUT \
--url https://api.meraki.com/api/v0/networks/${i}/syslogServers \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Cisco-Meraki-API-Key: xxxxxxxxxxxxxxxx' \
--data '{
"servers": [
{
"host": "10.46.99.21",
"port": 514,
"roles": [
"Wireless event log",
"URLs",
"Flow",
"Security events",
"Appliance event log"
]
}
]
}'
done But I get this error: curl: (3) URL using bad/illegal format or missing URL
... View more