From: Marc P. <ma...@en...> - 2008-05-16 20:07:07
|
On May 16, 2008, at 1:19 PM, Palle L Jensen wrote: > I just love Nagios; it does so much great work for you! > As you work with it though sometimes thoughts comes up, can it do > more? > > Here is my thought. > > For example Nagios sends out an alert on high CPU load, would it be > possible to add the URL to the graph for the CPU load? Yes, if you can programatically create the URL. > > ***** Nagios Monitoring 3.0.1 ***** > > Notification Type: PROBLEM > > Service: Cpu > Host: Server001 > Address: 000.000.000.000 > State: WARNING > Date/Time: Fri May 16 13:36:06 EDT 2008 > Url: http://000.000.000.000/nagios/cgi-bin/graphs.cgi?host=Server01&service=Cpu > > Additional Info: > > CPU Load 80% (5 min average) > > > This would be very cool cause then you could click on the link and > immediately get to the overview of the graphing of the CPU load. > Does anyone know if this would be possible? Very simply. Edit your service notification command to include, in the appropriate place you want it to appear, -- Url: http://000.000.000.000/nagios/cgi-bin/graphs.cgi?host=$HOSTNAME$&service=$SERVICEDESC$ Note that this will only work if your service descriptions do not contain spaces or any other special URL characters (&, ?, etc). If they do, you'll need to make your notiifcation command an actual script that URI Escapes those before sending the e-mail. -- Marc |