Stéphane Thirion
  • Home
  • Consulting – Raidho
  • homelab
3K
0
0
0
Stéphane Thirion
Stéphane Thirion
  • Home
  • Consulting – Raidho
  • homelab
  • ArchY.net Site
  • Experience
  • Linux

Installing Cacti in my lab

  • October 28, 2011
  • Stephane Thirion
Total
0
Shares
0
0
0
0
0
0
0

I needed to monitor my Lab at home and check what I could do with Cacti to monitor Citrix XenServer, XenApp, XenDesktop, PVS, SQL etc… I chose to use a all in one distrib at first, CactiEZ () but I ran out of possibilities very fast and CactiEZ is still based on a CentOS 4 version… If you don’t care about the CentOS version, you do thing a lot more easy by using this distrib. I chose to use CentOS 5 () for some other reasons but mostly because this OS is supported by XenServer.

When you chose to start with a clean OS installation you need to know what you want to install, because either you install everything, including what you don’t need, either you install almost nothing and install only what you’ll need. I tried to make a clean work and chose to start with a clean installation, the lightest possible and install only what I would need.

Minimal installation type, I just posted screenshots to let some of you follow the same step, I don’t have any specific advanced knowledge on Linux stuff :

Then once rebooted, you need to check your network configuration and make necessary change to make it work on your LAN.

Before going with Cacti installation process, I wanted to have my CentOS distrib up to date, so I ran the following command :

yum update

Cacti will use SNMP so this is the command you need to run to install and enable SNMP :

yum install net-smtp

Cacti needs a database, I chose MySQL because this a the one I know the more and it’s very easy to setup :

yum install mysql

yum install mysql-server

Then to install Cacti using a yum command, you need to create a new file named dag.repo in the following directory :

vi /etc/yum.repos.d/dag.repo

past

dag.repo   
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=$releasever/en/$basearch/dag
gpgcheck=0
enabled=1
protect=0

save this file and run :

yum install cacti

To be able to access Cacti web setup pages, you need to allow web access :

vi /etc/httpd/conf.d/cacti.conf

remove the line “deny from all”

Now you need to start the MySQL service and apache web service and make those two services start automatically at you server boot.

service mysql start

service httpd start

chkconfig –level 345 httpd on

chkconfig –level 345 mysqld on

To configure MySQL for Cacti ,you need to setup the access and create the database and user :

Source code   
mysqladmin --5.1/en/information-functions.html">user=root 5.1/en/encryption-functions.html">password somepassword
 
mysqladmin --5.1/en/information-functions.html">user=root --5.1/en/encryption-functions.html">password reload
 
mysqladmin --5.1/en/information-functions.html">user=root --5.1/en/encryption-functions.html">password 51&q=CREATE&lr=lang_en">create cacti
 
mysql -p cacti < /var/www/cacti/cacti.sql
 
mysql --5.1/en/information-functions.html">user=root --5.1/en/encryption-functions.html">password mysql
 
51&q=GRANT&lr=lang_en">GRANT 51&q=ALL&lr=lang_en">ALL 51&q=ON&lr=lang_en">ON cacti.* 51&q=TO&lr=lang_en">TO cactiuser@localhost IDENTIFIED BY 'somepassword';
 
flush 51&q=PRIVILEGES&lr=lang_en">privileges;

Next edit the config.php file in /var/www/cacti/include/

config.php   
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "password";

save the file and the give proper rights :

chown -R cactiuser /var/www/cacti/rra/ /var/www/cacti/log/

and add this line to your crontab file :

*/5 * * * * cactiuser php /var/www/cacti/poller.php > /dev/null 2>&1

Here is the Cacti web installation process using the address :

After to add some plugins you need to change many files in Cacti’s base installation dir, to do so without destroying or missing something, you need to download the Cacti Plugin Architecture (same version as your Cacti version, 8.7h for me)

tar -zxvf cacti-plugin-0.8.7h-PA-v3.0.tar.gz

Then you need to copy the .diff file to your cacti install directory and run :

patch -p1 -N –dry-run < cacti-plugin-0.8.7h-PA-v3.0.diff to test if everything is ok

then patch -p1 -N  < cacti-plugin-0.8.7h-PA-v3.0.diff

And you’re all set ! Next work will be on writing a template and script to catch XenApp sessions and XenDesktop metrics.

Total
0
Shares
Tweet 0
Share 0
Share 0
Share 0
Share 0
Share 0
Share 0
Related Topics
  • Cacti
  • Citrix
  • Monitoring
  • snmp
  • XenApp
Stephane Thirion

Previous Article
  • Citrix
  • Experience
  • Linux
  • XenServer

How to enable SNMP on Citrix XenServer 6

  • October 9, 2011
  • Stephane Thirion
View Post
Next Article
  • Apple
  • Citrix
  • Events
  • Mac OSx
  • NetScaler
  • Receiver
  • ShareFile
  • Synergy
  • Uncategorized
  • XenApp
  • XenDesktop
  • XenServer

Synergy Barcelona 2011 – Personal Cloud 1/3

  • October 29, 2011
  • Stephane Thirion
View Post
You May Also Like
View Post
  • Experience
  • Linux
  • VMware
  • vSphere

multipathd errors in /var/log/syslog

  • Stephane Thirion
  • August 2, 2022
View Post
  • Experience
  • Raspberry

Install Zigbee2MQTT on a Raspberry Pi Zero W

  • Stephane Thirion
  • July 8, 2022
View Post
  • Docker
  • Experience
  • Kubernetes
  • Linux
  • Raspberry

Kubernetese cluster use with Crypto Currency (Monero)

  • Stephane Thirion
  • January 4, 2022
View Post
  • ADC
  • Experience
  • Linux

Cloud yes but no, thanks (there is some Citrix)

  • Stephane Thirion
  • December 7, 2021
View Post
  • ArchY.net Site
  • Azure
  • Citrix
  • Cloud
  • Experience
  • Microsoft
  • News
  • Office365
  • Raidho
  • VMware

Mettre en place une solution de travail à distance (RemoteOffice / Remoteworking) 2/2

  • Stephane Thirion
  • March 24, 2020
View Post
  • Amazon
  • Citrix
  • Cloud
  • Experience
  • Microsoft
  • News
  • Office365
  • Raidho
  • Security
  • VMware

Mettre en place une solution de travail à distance (RemoteOffice / Remoteworking) 1/2

  • Stephane Thirion
  • March 22, 2020
View Post
  • ArchY.net Site
  • Citrix
  • CTP
  • E2E - PubForum
  • Events
  • Microsoft
  • VMware

E2EVC Athens, Greece AD 2018

  • Stephane Thirion
  • November 5, 2018
View Post
  • Experience
  • Microsoft
  • PowerShell
  • Scripting
  • Windows 2016
  • XenApp

XenApp Windows 2016 build report

  • Stephane Thirion
  • May 25, 2018
vmware
Coinbase – Affiliated link
Blog Stats
  • 1,236,746 hits
Categories
  • Amazon (1)
  • Apple (20)
    • iOS (5)
    • Mac OSx (11)
  • ArchY.net Site (30)
  • Azure (8)
  • Certifications (3)
  • Citrix (207)
    • ADC (1)
    • Citrix Virtual Apps and Desktops (3)
    • NetScaler (12)
    • Password Manager (3)
    • Personal vDisk (5)
    • Power and Capacity Management (3)
    • Provisioning Services (22)
    • Receiver (29)
    • ShareFile (8)
    • Single Sign On (3)
    • SmartAuditor (2)
    • Storefront (12)
    • Synergy (25)
    • User Profile Management (2)
    • VDI (7)
    • WebInterface (21)
    • XenApp (84)
    • XenApp Plugin (3)
    • XenClient (10)
    • XenDesktop (55)
    • XenServer (42)
  • Cloud (12)
  • Crystal Ball (2)
  • CTP (13)
  • Docker (2)
  • Events (35)
    • E2E – PubForum (9)
    • Geek Speak (3)
  • Experience (53)
  • Kubernetes (2)
  • Licensing (3)
  • Linux (12)
  • Microsoft (145)
    • Azure (8)
    • Office365 (4)
    • PowerShell (18)
    • RDS (5)
    • Windows 10 (6)
    • Windows 2003 (21)
    • Windows 2008 (20)
    • Windows 2008 R2 (54)
    • Windows 2012 (13)
    • Windows 2012R2 (13)
    • Windows 2016 (18)
    • Windows 2019 (4)
    • Windows 2022 (1)
    • Windows 7 (27)
    • Windows 8 (19)
    • Windows Virtual Desktop (1)
    • Windows XP (11)
  • News (5)
  • Raidho (2)
  • Raspberry (3)
  • Scripting (13)
  • Security (4)
  • Slide Deck (1)
  • Thin Clients (3)
  • Twitter (1)
  • Ubiquiti (1)
  • Uncategorized (12)
  • VMware (27)
    • VMWare WorkStation (2)
    • vSphere (15)
Stéphane Thirion
Don't Follow the Trend

Input your search keywords and press Enter.

 

Loading Comments...