Configure IP SLA to generate syslog messages

Answered Question
May 20th, 2010

Hi,

I want to use IP SLA to perform simple up/down monitoring of an IP host and to generate a syslog alert if the host goes down.

I have a 2650XM router running 12.4(23) IP Voice IOS.

My basic IP SLA config is hown below:

ip sla monitor 10

type echo protocol ipIcmpEcho 10.55.1.1

timeout 1000

frequency 10

ip sla monitor schedule 10 life forever start-time now

Based upon the output of the show ip sla monitor statistics command the up/down status of the host is being tracked ok.

GWYDAT01#sho ip sla monitor statistics

Round trip time (RTT)   Index 10

        Latest RTT: NoConnection/Busy/Timeout

Latest operation start time: 09:23:19.426 BST Thu May 20 2010

Latest operation return code: Timeout

Number of successes: 24!

logging buffered 4096 debugging

logging console informational

Number of failures: 4

Operation time to live: Forever

I cannot seem to get the system to generate syslog alerts however. I have added the ip sla monitor logging traps command but nothing seems to be generated.
!
logging buffered 4096 debugging
logging console informational
!
Please can you advise what I need to do to get syslog traps logged to the console and internal buffer.
Thanks
I have this problem too.
0 votes
Correct Answer by Hitesh Vinzoda about 6 years 6 months ago

I didnt mentioned the below command

snmp-server enable traps rtr

Try it and let me know, also enable debug snmp packets and see when violation occurs does the device sends traps to NMS, just for verification.

Regards

Hitesh Vinzoda

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Hitesh Vinzoda Thu, 05/20/2010 - 02:52

Hi,

The command ip sla monitor logging traps generates a syslog trap not a syslog message.

You may send this traps to NMS stations listening to traps. Use following commands with the above one to do so,

snmp-server community TEST RW
snmp-server enable traps syslog
snmp-server host 1.1.1.2 TEST

snmp-server host 1.1.1.2 TEST syslog

This will sent the IP sla logging to NMS station listening on port 162.

HTH

Hitesh Vinzoda

Please rate useful posts.

James Hawkins Thu, 05/20/2010 - 05:15

Hi Hitesh,

Thank you for the reply. I have added the SNMP commands from your post but it still does not seem to be working.

When I replicate the monitored condition no SNMP trap is generated.

SNMP logging: enabled

    Logging to 10.1.1.225.162, 0/10, 0 sent, 0 dropped.

Do I need to configure the ip sla monitor reaction-configuration or reaction-trigger commands?
Thanks
James Hawkins Thu, 05/20/2010 - 14:02

Hi,

Just to let you know that I have managed to get an alert shown on the console by adding the command listed below:

track 1 rtr 10

  delay down 10 up 20

I know that this was not what initially asked for but it does show in the log when the monitored condition changes.

Thanks to everyone who read the post.

Correct Answer
Hitesh Vinzoda Thu, 05/20/2010 - 22:09

I didnt mentioned the below command

snmp-server enable traps rtr

Try it and let me know, also enable debug snmp packets and see when violation occurs does the device sends traps to NMS, just for verification.

Regards

Hitesh Vinzoda

rogelioalvez Thu, 05/23/2013 - 08:00

Hello Hitesh:

My name is Rogelio; I am a technician located in Argentina. I am experiencing quite the same problem mentioned in this thread.

Actually, I just see the trap sent ONCE (more preciselly, when the IP SLA object starts and times out in reaching the objective). ¿Is this the expected behavior?

I want the trap be sent (either SNMP or SYSLOG style) EVERY TIME the IP SLA object times out with the target. ¿ is it possible? The following is my basic configuration:

ip sla 2

icmp-echo 141.167.85.153

threshold 1500

frequency 15

ip sla schedule 2 life forever start-time now

ip sla reaction-configuration 2 react timeout threshold-type immediate action-type trapOnly

logging trap debugging

logging source-interface Loopback0

logging 141.167.121.222

snmp-server enable traps syslog

snmp-server enable traps ipsla

snmp-server host 141.167.121.222 mycommunity  syslog ipsla

Your help will be greatly appreciated

regards, rogelio

SOcchiogrosso Thu, 05/23/2013 - 18:37

You can also configure an EEM script to monitor the IP SLA and of then have the EEM script generate a message. I'll posy the script when I get a computer. But with that you can your NMS alert when it sees this particular message. That's what I have done in the past.


Sent from Cisco Technical Support Android App

rogelioalvez Mon, 05/27/2013 - 14:24

Hi Sochi:

Thank you very much for answer, and I apologize for my late answer. I have been 5 days without broadband access...

I managed to build an EEM script, but the problem is that I can only generate an event "once". I need the router to generate a notification (trap, syslog, or both) EVERY time the condition is met (ie, as long as the IP SLA object times out, i want the router to generate an event.

As far as I saw, there is no simple way to generate a continuous stream of events (once each time the IP SLA times out).

Any hints will be appreciated!

regards, Rogelio

Actions

This Discussion

Related Content