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

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

keglass
Level 7
Level 7

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

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.

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

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 ?

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

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

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

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 

 

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

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card