cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4573
Views
11
Helpful
10
Replies
Highlighted

Hostname in Syslog

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

10 REPLIES 10
Rising star

Re: Hostname in Syslog

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

Re: Hostname in Syslog

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.

Rising star

Re: Hostname in Syslog

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.

Cisco Support Community - Cisco Support Community

Re: Hostname in Syslog

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 ?

VIP Advisor

Re: Hostname in Syslog

Hello

If you trying to tag the hostname to be included in console/monitor/buffer  outputs  using the origin-id  then its not applicable,



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future

Re: Hostname in Syslog

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

Beginner

Re: Hostname in Syslog

Hi ayoubblabidi@gmail.com,
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

Re: Hostname in Syslog

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 

 
Beginner

Re: Hostname in Syslog

Hi again,
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

Re: Hostname in Syslog

Yes, that's it, good job. I am sorry not to have been able to get back to you sooner.

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards