Cisco Switch
UTMStack v12 collects Cisco switch logs through the UTMStack Forwarder, which the web interface calls the Collector. You enable the Cisco Switch integration on a Collector, then point the switch's syslog at that Collector. Nothing is installed on the switch.
Connection details
| Setting | Value |
|---|---|
| Card on the Integrations page | Cisco Switch (category Network) |
| Data type | cisco-switch |
| Default ports on the Collector | 514/UDP; 1470/TCP (also used for TLS) |
| Log format UTMStack reads | Cisco IOS and IOS XE system messages (%FACILITY-SEVERITY-MNEMONIC: …), IOS 15 SY to IOS XE 17 |
| Parsing pipeline | cisco/cs_switch.yaml, version 3.2.0. Filters in the card's drawer opens it. |
| Detection rules | 3. Rules in the card's drawer opens them. |
Before you begin
A Collector must be installed and online. If you do not have one, see UTMStack Forwarder. One Collector can serve all your integrations.
The switch must reach the Collector host on the port you use. Open it on the Collector host and on any firewall in between.
You need the
integrations.writepermission to enable the integration from the web interface.Cisco ASA, Cisco Firepower, Cisco Meraki and Cisco Switch all use 514/UDP and 1470/TCP by default, and only one integration can listen on a port and protocol on the same Collector. If you collect more than one of them on one Collector, give each its own port (see Use a different port below).
Step 1: Enable the integration on a Collector
- 1
Open the integration
In UTMStack, go to Configure > Integrations and open the Cisco Switch card.
A different number typed in Port does not change the port the Collector listens on; see Use a different port below. The guide's step 2 says privileged EXEC mode, but the commands need configuration mode (
configure terminal), as step 2 below shows. - 2
Choose the Collector and protocol
Under Enable this integration remotely, select the Collector and the Protocol (UDP, TCP or TLS). Leave Port at the default it fills in.
- 3
Enable it
Click Enable integration. The panel then shows, for example,
Currently: enabled · udp · port 514.
To do the same on the Collector host instead, run:
sudo /opt/utmstack-forwarder/utmstack_forwarder enable-integration cisco-switch udpThe command prints the port the Collector really listens on, for example Integration "cisco-switch" enabled on udp port 514.
To use TLS, load a certificate on the Collector first. See UTMStack Forwarder.
Use a different port
For built-in integrations, the Collector always listens on the port saved on the Collector host. That is the default port unless you change it there. A different number typed in Port, or on the enable-integration command line, is not used. To use another port:
On the Collector host, change the saved port. For example, to move Cisco Switch over UDP to 5143:
sudo /opt/utmstack-forwarder/utmstack_forwarder change-port cisco-switch udp 5143Use
tcpinstead ofudpfor TCP and TLS.In the Cisco Switch card, type the same port in Port when you enable the integration. If it is already enabled, click Disable integration first, then enable it again with the new port. The panel shows the port you type there, not a value read from the Collector, so typing the same port keeps the two in step.
Point the switch at the new port in step 2.
Step 2: Configure the switch to forward logs
On your Cisco switch, enable syslog and point it at the Collector host. From privileged EXEC mode, enter configuration mode (configure terminal), then run these commands. Replace <collector-ip> with the address of the Collector host.
logging on
logging host <collector-ip>
logging trap informationallogging host with only an address sends over UDP to port 514. To send to another UDP port, or over TCP, add a transport. For example, for TCP to the default TCP port:
logging host <collector-ip> transport tcp port 1470For TLS, and for the exact syntax on your platform, see Cisco's documentation for your IOS or IOS XE version. Save the configuration with copy running-config startup-config when you are done.
Step 3: Check that logs arrive
- 1
Open the logs
In the Cisco Switch drawer, click View logs. Log Explorer opens with the
cisco-switchdata type for the last 24 hours. You can also open Log Explorer, keep the data setlogsand choosecisco-switchas the data type. - 2
Check the parsed fields
Expand an event. Parsed events have switch fields under
log., such aslog.facility,log.severityandlog.facilityMnemonic, and standard fields such asorigin.ipwhere the message names an address. The event should have noerrors. - 3
Check the data source
Within about 20 minutes, the switch appears on the Data Sources page under Direct, named after the address its logs come from.
A quick way to create a message is to enter and leave configuration mode on the switch: it logs a %SYS-5-CONFIG_I message.
To list the latest events and any processing errors, switch Log Explorer to SQL mode and run:
SELECT `@timestamp`, dataSource, errors, raw
FROM logs
WHERE dataType = 'cisco-switch'
AND `@timestamp` > now() - INTERVAL 1 HOUR
ORDER BY `@timestamp` DESC
LIMIT 20Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| Nothing arrives | The Collector is offline, or the switch sends to the wrong address, port or protocol, or a firewall blocks the port. | Check that the Collector shows as online in the Collector list. Run show logging on the switch to see the destination and counters. Check that the Collector host allows the port in. See Forwarder Troubleshooting. |
| Nothing arrives from a switch that uses a management VRF or interface | The switch sends from an interface without a route to the Collector. | Set the source with logging source-interface <interface>, or add the VRF to the logging host line. See Cisco's documentation. |
Enabling fails with port 514 is already in use by integration '…' | Another Cisco integration already listens on 514/UDP on this Collector. | Move one of them to another port with change-port (see Use a different port), or use a second Collector. |
Enabling fails with port 514 is already in use by another process | Another program on the Collector host, often the system syslog service, holds the port. | Stop that program from listening on the port, or move Cisco Switch to another port. |
Switch logs appear under firewall-cisco-asa or another data type | The switch sends to the port of a different integration. | Send to the port that the Cisco Switch integration listens on. |
| Only severe messages arrive | logging trap is set to a low level. | Set logging trap informational. |
Stop collecting
In the Cisco Switch card, select the same Collector and click Disable integration, or run on the Collector host, with the protocol you enabled (udp, tcp or tls):
sudo /opt/utmstack-forwarder/utmstack_forwarder disable-integration cisco-switch udpThen remove the destination from the switch (no logging host <collector-ip>).