Hostname in Syslog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2018
09:51 AM
- last edited on
03-25-2019
04:47 PM
by
ciscomoderator
I am attempting to get my syslog messages to contain my hostname. Below is my current config as well as a copy of the logging in the router. Can someone explain what I am doing wrong? I have also included my version of IOS in case that is a factor.
#sh run | i logg
logging buffered 51200 debugging
logging trap debugging
logging origin-id string MAS-RTR-01
logging facility local5
logging source-interface FastEthernet0/0.1
logging 192.168.x.x
Feb 7 17:50:17.598: %SYS-5-CONFIG_I: Configured from console by brandon.strode.adm on vty0
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(25d), RELEASE SOFTWARE (fc1
- Labels:
-
LAN Switching

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2018 10:10 AM
Brandon,
I found a similar thread in the Cisco Support Community that may help you. There are a number of
discussions there, too, if you research the topic.
Hostname on switch shows as on name on ... - Cisco Support Community
I hope this helps.
Kelli Glass
Moderator for Cisco Customer Communities
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2018 11:23 AM
I have seen this thread and read through it. I have tried a couple of the solutions listed but as the question was never fully answered I figured posting my own thread was the most viable option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2018 03:55 PM
Brandon,
If you haven't done so already, please post this to the Cisco Support Community. Experts there can help you troubleshoot and can help provide additional information specific to your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2019 02:14 AM
Hello everyone,
I use Graylog 2.5 Please , in the case of switch Logs meesage , how can i see the log source with the name of Switch not his address IP ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2019 03:54 AM
Hello
If you trying to tag the hostname to be included in console/monitor/buffer outputs using the origin-id then its not applicable,
Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.
Kind Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2019 06:25 AM
Hi @paul driver ,
Thank you very much for your answer, but I don't know if you have understand me, my problem how can i see the log source ( in the graylog) with the name of Switch not his address IP, i would know how to configure my switch cisco to send the messages with their hostname not the ip address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2019 04:09 AM
I have the same issue with Gray log and Cisco Catalyst Switch scenario.
Do you have any thoughts about how can I fix it?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2019 12:59 AM
Hello @MarcoCosta2487 ,
Please try adding the followin to your cisco device:
#logging origin-id hostname
and more precisely
#conf t
#logging origin-id string <device_hostname/>
#do wr
#end
best regards,
AYOUB LABIDI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2019 06:07 AM
I fixed it!
As i was tell you, i have the Graylog - Cisco Catalyst scenario, and the switch logs are sended with IP addres instead the hostname.
Resolution:
#conf t
#ogging origin-id string <device_hostname/>
#do wr
#end
Marco Aurélio Costa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2019 07:09 AM
Yes, that's it, good job. I am sorry not to have been able to get back to you sooner.
