Cacti/de

From OpenSimulator

Revision as of 19:06, 16 April 2016 by Manni (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Cacti Tree View

Überblick

Um eine ganze Reihe von Servern (oder nur Ihre eigenen Heimserver) zu überwachen, können Sie Cacti verwenden. Kakteen ist ein fortschrittliches rrdtool, die in Kombination mit NetSNMP verwendet werden kann. So können Sie ein leistungsfähiges Monitoring-Tool haben, das kann den Überblick über alle Arten von Daten zu halten. Die Grafiken können in opensim importiert werden, oder Maschinen schnell manipuliert werden können Skripte SNMP- und Python (mit modrex).

Verfahren

  • Installieren Sie RRDTools; Wahrscheinlich in Repo Ihre Distributionen, sonst herunterladen mit:
svn co svn://svn.oetiker.ch/rrdtool/branches/1.2/program

Schauen Sie sich die instuctions wie RRDTools bauen

  • Installieren Sie net-snmp; Wahrscheinlich in Repo Ihre Distributionen, sonst herunterladen mit:
svn co https://net-snmp.svn.sourceforge.net/svnroot/net-snmp net-snmp 

Überprüfen Sie die instuctions wie zu bauen net-snmp

  • Download cacti
  • Copy cacti into your Apache's www directory (/srv/http in this tutorial)
  • Add a cacti database into mysql, and add give a cacti-user all privileges for that database
  • Edit /srv/http/cacti/include/config.php, and fill in the mysql info
  • Create a crontab
crontab -e
# paste this line in, and save
* * * * * php /srv/http/serverstats/poller.php > /dev/null 2>&1
  • Login to cacti from the browser with admin,admin and change the password

Ok, this was the first part. Cacti is running, and you've installed all necessary software. Get yourself a nice cup of coffee if you wish, so we can proceed to the next level: Setting up snmp to return the stats that we so desperatly want...

Snmp comes in three flavors: version 1,2 and ...3 . Suppose you want to manage machines across the internet, you should check out version 3; which has user authentication and protection. For now, we'll use version 2.

Cacti Detailed View
  • Add this envpath to '/etc/profile'. Net-SNMP uses this to determin where the config file is
SNMPCONFPATH=/etc/snmp:/usr/local/etc/snmp
  • Create the file '/etc/snmp/snmpd.conf' and fill with this:
# rwuser: a SNMPv3 read-write user
# arguments: user [noauth|auth|priv] [restriction_oid]
rwuser rwos auth
# rouser: a SNMPv3 read-only user
# arguments: user [noauth|auth|priv] [restriction_oid]
rouser roos noauth .1.3.6.1.4.1.8072
# rocommunity: a SNMPv1/SNMPv2c read-only access community name
# arguments: community [default|hostname|network/bits] [oid]
rocommunity public .1.3.6.1.2.1.1
# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
# arguments: community [default|hostname|network/bits] [oid]
rwcommunity private 127.0.0.1
 
syslocation "My Wicked OpenSimulator Datacenter"
syscontact "Your evil admin - evil@hell.org"
agentaddress tcp:161,udp:161
  • Restart the SNMP-Daemon, and test whether you can receive data(You should get a list of data here):
snmpwalk -v 2c -c private localhost
  • Go to Cacti, and modify the host called localhost(or add a new one, if none is there)

Some important settings: hostname tcp: 127.0.0.1 host template: Generic SNMP-enabled host SNMP version: 2 SNMP community: private

  • On top of the host, you should see some SNMP-information.
  • From here you need to add some graphing options. This can be done by adding things to Associated Data Queries(in the hostconfig), and then go to 'Create graphs for this host' (at the top). You will see some additional options here, that are linked to the data queries. Add graphing options here...
  • From now on, I suggest you get used to the cacti-interface by exploring all of it's settings

Next is the customizing of stats to reflect opensim specific information

Informative Links

NET-SNMP Wiki

Create and Use Templates in Cacti

Opensimulator Spezifische Statistiken

Andere Statistiken

OsGetRegionStats

ServerStats

Cacti

Collectd

Personal tools
General
About This Wiki