SSH Cacti Plugin 1.0 Released

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

User avatar
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

SSH Cacti Plugin 1.0 Released

Post by N3NCY »

SSH Cacti Plugin 1.0 Released

Go easy on me, this is my first try at creating a plugin!
8)

In short:
This plugin adds a tab into Cacti that has an embedded Java SSH client.
The client is built using the JTA:
http://javassh.org

Install (Like most other typical plugins):
Download / ungzip / untar and copy to your plugins folder.
Example from UNIX:
(You will need to edit this to point to where you have Cacti installed of course)
cd /usr/src
wget http://forums.cacti.net/download.php?id=11871
mv "download.php?id=11871" ssh.tar.gz
tar xvf ssh.tar.gz -C /opt/apache/htdocs/cacti/plugins/
# Add the plug-in to the array
vi /opt/apache/htdocs/cacti/include/global.php
$plugins = array();
$plugins[] = 'ssh';
# Reset file permissions (make sure you use the correct user:group for your server of course)
chown -R www:www /opt/apache/htdocs

Log in to your Cacti web interface and verify that the plug-in is working.
Note: Many plug-ins require you to allow permission for each web user to view and use the new plug-in.
From the Cacti web interface, Click the "Console" tab then click "User Management" and pick the user of your choice and verify the check boxes.
Make sure View SSH is checked.

Next tell the plugin the name or IP of your SSH server:
Click the Console tab then Settings then the Misc tab and fill in SSH Host

Notes:
- You need to have Java installed on your workstation (for use with your browser / this embedded plugin)
- You need to have a functional SSH server running on your Cacti box (or somewhere) for this plugin to connect to

Environment:
Built on my development FreeBSD VMware machine and tested under these conditions with IE7 on Windows XP with Sun Java 1.5x:
Cacti Version - 0.8.7a
Plugin Architecture - 1.4
Poller Type - CMD.php
Server Info - FreeBSD 6.2-RELEASE
Web Server - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
PHP - 5.2.5
PHP Extensions - xmlwriter, libxml, dom, xmlreader, xml, tokenizer, session, pcre, SimpleXML, SPL, PDO, sockets, soap, snmp, SQLite, standard, Reflection, posix, pdo_sqlite, pdo_dblib, odbc, mysql, mssql, mbstring, ldap, json, iconv, hash, gd, ftp, filter, exif, dbase, dba, date, curl, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler
MySQL - 5.0.51
RRDTool - 1.2.26
SNMP - 5.4.1
Plugins
  • Global Plugin Settings (settings - v0.3)
    Host Info (hostinfo - v0.2)
    Network Discovery (discovery - v0.8.3)
    Device Tracking (mactrack - v1.1)
    Read-only Devices Tab (devices - v0.4)
    SuperLinks (superlinks - v0.72)
    Update Checker (update - v0.4)
    Network Tools (tools - v0.2)
    Device Monitoring (monitor - v0.8.2)
    Thresholds (thold - v0.3.9)
    PHP Network Managing (manage - v0.5.1)
    Syslog Monitoring (syslog - v0.5.2)
    NTop Viewer (ntop - v0.1)
    B.A.S.E Viewer (B.A.S.E - v0.1)
    Cycle Graphs (Cycle Graphs - v0.4)
    ReportIt (ReportIt - v0.5.1)
    Documents (docs - v0.1)
    SSH Viewer (ssh - v1.0)
    IP subnet Calculator IPv4 IPv6 (ipsubnet - v.4d)
    Poller Performance Report (pollperf - v0.32)
    Real-time statistics (zond - v0.34a)
    Create Aggregate Graphs (aggregate - v0.64)
    RRD File Cleaner (RRD Cleaner - v0.32)
    Configuration manager (configmanager - v0.75)
Thank you to the entire Cacti team for continued work on Cacti including Jimmy Conner for great plugin examples!
Attachments
ssh.tar.gz
SSH Cacti Plugin 1.0
(241.3 KiB) Downloaded 1263 times
SSH Cacti Plugin 1.0
SSH Cacti Plugin 1.0
Cacti-SSH-Plugin.png (10 KiB) Viewed 25262 times
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Where's the Small Tab? Huh? Geez.. I expect small tabs.
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
User avatar
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

It is in the images directory.
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Call me if you're still up.
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

streaker69 wrote:Where's the Small Tab? Huh? Geez.. I expect small tabs.
Those small tabs ought to have a different name to the big ones you know... then you don't have to mangle your Cacti install to switch between the two sizes.

(neat plugin n3ncy :-) )
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Howie wrote:
streaker69 wrote:Where's the Small Tab? Huh? Geez.. I expect small tabs.
Those small tabs ought to have a different name to the big ones you know... then you don't have to mangle your Cacti install to switch between the two sizes.

(neat plugin n3ncy :-) )
I agree, but we'd need someone that knows more than I do to actually write a plugin that allows switching between big and small.

Plus we'd need a standard naming convention for big/small and up/down as well as agree upon a format.

Oh, and I was only harrassing him so much because he's a good friend of mine, in case you were wondering. I wouldn't do that to just anyone that's putting out a plugin.
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
eternal
Cacti User
Posts: 68
Joined: Thu Dec 14, 2006 4:38 pm
Location: Kingsport TN
Contact:

Post by eternal »

[Tue Jan 22 10:25:53 2008] [error] [client foo] File does not exist: /var/www/html/plugins/ssh/de


I get error
And can never login.



Any easy way to add more than one host?
apperrault
Cacti User
Posts: 379
Joined: Fri Feb 16, 2007 11:37 am
Location: Emeryville, CA
Contact:

Post by apperrault »

looking at this plugin, is it safe to assume that this is for Unix type installs only?

looks like a great plugin, and i would love to use it on Windows.

app
[b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.2 Beta
[b]Poller Type[/b] - CMD.php
[b]Server Info[/b] - Linux 2.6.9-78.0.1.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (Red Hat)
[b]PHP[/b] - 4.3.9
[b]MySQL[/b] - 4.1.22
[b]RRDTool[/b] - 1.2.23
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]Global Plugin Settings (settings - v0.5)
SuperLinks (superlinks - v0.72)
Host Info (hostinfo - v0.2)
Report Creator (reports - v0.3)
Update Checker (update - v0.4)
Realtime for Cacti (realtime - v0.35)
Cacti Log View (clog - v1.1)
RRD File Cleaner (rrdclean - v0.36)
Network Discovery (discovery - v0.9)
Uptime (uptime - v0.4)[/list]
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Yummy :) :) :) Can I make some changes?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

TheWitness: Make any changes you like!

Howie: The small tabs do have a different name.
Do you have a standard naming convention I should be using?
BTW, I used your Superlinks to create the tabs in my screen cap above!
We need to integrate tab creation into the plugin architecture based on your Superlinks code so people making plugins don't need to make tabs.
In fact, I think your Superlinks could make a nice start towards a "theme" capability for Cacti. Thank you for Superlinks!

apperrault: The plugin itself will run from a Windows Cacti.
You will need to point to a valid SSH server on the config tab.

eternal: Do you have Java installed on your workstation?
And yes, this plugin could be modified for more hosts.
I picture a future version that works like the Zond plugin and puts a button next to each graph that allows you to SSH or Telnet to every host you want.

streaker69: You call me!
:lol:
And I think I can implement auto switching between small and large tabs, but getting Howie's input would be better.

-Ernie
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
apperrault
Cacti User
Posts: 379
Joined: Fri Feb 16, 2007 11:37 am
Location: Emeryville, CA
Contact:

Post by apperrault »

Wow, that looks pretty cool. One question though. All of our devices connect via SSH2 on port 22, not over port 23, how would i make that change?

Also, is there a way to make the SSH connect dynamic? Rather than only have the ability to connect to one machine, make is something where i can type in the IP address or DNS name and connect that way? Or even better, if there was a way to tie it to the hosts table (like manage or monitor where you can put a check mark for SSH) so i could specify a specific host with the ability to SSH to it.

OMG the possibilities are endless.

Thanks for the plugin.

app
User avatar
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

apperrault: The current default now is SSH on TCP port 22
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
apperrault
Cacti User
Posts: 379
Joined: Fri Feb 16, 2007 11:37 am
Location: Emeryville, CA
Contact:

Post by apperrault »

That is what i thought. When i start the plugin i get the following message:

Code: Select all

sorry, could not connect to XX.XX.XX.XX 23
Let me know if you have any thoughts. i looked at the .conf file and it is indeed set to use port 22, so i dont understand why it is trying port 23.

Thanks again

app
User avatar
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

apperrault: It sounds like the config file is not being read.
Does the web server have permission to read the config?
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

i use this too in manage 0.5.2
but i open it in a new browser
i support also mrelay[d] for connecting to others hosts and URI scheme to allow a user to specify his own programs (putty, telnet...)

Image
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests