FAQFAQ   SearchSearch   RegisterRegister   ProfileProfile   Log inLog in 

Anyone add custom urls in the Monitor Plugin?

 
Post new topic   Reply to topic    CactiUsers.org Forum Index -> General
View previous topic :: View next topic  
Author Message
Ringrose
New User


Joined: 14 May 2008
Posts: 1

PostPosted: Wed May 14, 2008 9:05 am    Post subject: Anyone add custom urls in the Monitor Plugin? Reply with quote

I would like to add some custom urls to the monitor plug in. I would perfer to have them as icons, one to open a rdp session or web page and the other to open just a web page.

An example of this is that I monitor a Windows 2008 Server, I would like an icon next to the name that will allow me to open an RDP session I would also like to click on another icon that opens a web page with documentation on the server.

Anyone already try this and if not any suggestions on what I should research first?
Back to top
View user's profile
Linuxx
New User


Joined: 29 Jan 2008
Posts: 16

PostPosted: Thu May 15, 2008 5:20 pm    Post subject: Reply with quote

The problem you have is that you cant launch msrdp.exe from IE (I.E. rdp://10.10.10.4 ), unless you have remote desktop web connection installed on the server. Additionally your documentation link would need to consist of a constant path with the server name, or IP as the variable (I.E. http://document_server.corporate.local/servername or http://document_server.corporate.local/10.10.10.4).

After all of that, you would have to decide on a theme that you want to use in the Monitor section inside your cacti settings.
I like the look of;
Show Icon Legend = checked
Grouping = Tree
View = Tiles

That produces a view like this;

SERVERNAME
Status: Up
IP Address: 10.10.10.4
Ping: 31.09 ms
Last Fail: 2008-05-14 06:56:00
Availability: 99.9%


You would then have to edit the source code (monitor.php) and change the table to include your icons with those dynamic links, like this;

Code:
$title = "<table cellpadding=0 cellspacing=0>
   <tr><td colspan=2><b>$name</b></td></tr>
   <tr valign=top><td>Status:</td><td>$sdisplay</td></tr>
   <tr valign=top><td>IP Address:</td><td>$hostname</td></tr>
   <tr valign=top><td>Ping:</td><td>$ptime ms</td></tr>
   <tr valign=top><td>Last Fail:</td><td>$d</td></tr>
   <tr valign=top><td>Availability:&nbsp;&nbsp;</td><td>$avail%</td></tr>
   <tr valign=top><td><a href=\"http://document_server.corporate.local/" . $hostname . "\">Documentation</a></td><td><a href=\"http://" . $hostname . "/rdp\">RDP Link</a></td></tr>
</table>";


Of course if you do this, any updates will overwrite your changes, but with a little PHP and some time it would be easy.

Linuxx
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    CactiUsers.org Forum Index -> General All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Forums Sitemap