Forums

Bob Morley
Bob Morley
Offline
Resolved
0 votes
I have been having a play today and got it working nicely so I thought I would share it with you. There are some old post on the subject but I found most were out of date.

Info is from the forums here and also http://www.monitorix.org/doc_redhat.html

ClearOS 6.x


//Install these
yum install app-web-server rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI
perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple

//Download and install the monitorix package
rpm -ivh http://pkgs.repoforge.org/monitorix/monitorix-2.5.2-1.el6.rf.noarch.rpm


now you need to edit /etc/monitorix.conf
Add your host name and your eth1,ppp0, adapters
info about whats what is here http://linux.die.net/man/5/monitorix.conf

Then edit /etc/httpd/conf.d/monitorix.conf
At the moment its set to "127.0.0.1"
change that to "all"

service httpd start
service monitorix start


ClearOS 5.x

//Add this repo for the RRD and Perl
rpm -ivh http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm

//Install the following
yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI
perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple

//Wget this package, for some reason rpm -ivh was failing so meh
wget http://pkgs.repoforge.org/monitorix/monitorix-2.5.2-1.el5.rf.noarch.rpm
rpm -ivh monitorix-2.5.2-1.el5.rf.noarch.rpm

now you need to edit /etc/monitorix.conf
Add your host name and your eth1,ppp0, adapters
info about whats what is here http://linux.die.net/man/5/monitorix.conf

Then edit /etc/httpd/conf.d/monitorix.conf
At the moment its set to "127.0.0.1"
change that to "all"

service httpd start
service monitorix start


Now if you visit http://clearos/monitorix it should now work, note you will need to open the firewall incomming 80 to access the page externaly. The page takes a few mins to update so dont worry if you dont see any data for a while or get NANs.

Can some one let me know if setting "127.0.0.1" is a security flaw, and also how to get httpd to start automaticly. I have for now created a file called S25bobstart


service httpd start
service monitorix start


ln -s /root/S25bobstart /etc/rc4.d/S25bobstart

I am chucking my custom stuff in there at the moment. I know this is probably not right. So any help would be welcome.
Thursday, March 14 2013, 08:54 PM
Share this post:
Responses (18)
  • Accepted Answer

    mihai
    mihai
    Offline
    Monday, July 07 2014, 02:21 PM - #Permalink
    Resolved
    0 votes
    managed to make it work:

    1. install deps:
    yum install httpd rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple

    2. get latest rpm from http://www.monitorix.org/

    3. install via yum : yum localinstall monitorix*

    4. Create and edit /etc/httpd/conf.d/monitorix.conf

    cat /etc/httpd/conf.d/monitorix.conf
    Alias /monitorix /var/lib/monitorix/www
    ScriptAlias /monitorix-cgi /var/lib/monitorix/www/cgi
    Listen *:8088
    <Directory /var/lib/monitorix/www/cgi/>
    DirectoryIndex monitorix.cgi
    Options ExecCGI
    order deny,allow
    deny from all
    allow from all
    </Directory>

    # Apache rules to restrict access to Monitorix:
    # Don’t forget to add <username> in .htpasswd with the ‘htpasswd’ command.
    #

    # Uncomment these lines
    <Directory “/var/lib/monitorix/www”>
    Options Indexes Includes FollowSymLinks
    Order Deny,Allow
    Deny from All
    allow from all
    AllowOverride None
    AuthUserFile /etc/httpd/conf/.htpasswd
    #AuthName “Monitorix: Restricted access, sorry.”
    AuthName "Authorization Required"

    AuthType Basic
    Require user <username>
    Satisfy Any
    </Directory>
    [firewall@Bumblebee ~]$

    --------------------
    i used port 8088. you can change it.If you used apache keep in mind to disable httpd-build in from /etc/monitorix/monitorix.conf

    hope it helps
    :)
    The reply is currently minimized Show
  • Accepted Answer

    mihai
    mihai
    Offline
    Sunday, July 06 2014, 08:22 PM - #Permalink
    Resolved
    0 votes
    had anyone tried to install it on 6.5 x64?
    i manage to install it without issues but unfortunatelly can't access it.
    can't find in the config file where to change the interface bind from 127.0.0.1 to all.
    rpm -qa | grep monitorix
    monitorix-3.5.1-1.noarch
    The reply is currently minimized Show
  • Accepted Answer

    Monday, November 04 2013, 08:45 PM - #Permalink
    Resolved
    0 votes
    Installation on 6.4 went oke but for some sort of reason i don't see anything happen on the Apache graph just a red line?
    Any answer on this?
    The reply is currently minimized Show
  • Accepted Answer

    maxwell
    maxwell
    Offline
    Thursday, October 10 2013, 04:53 PM - #Permalink
    Resolved
    0 votes
    MONITORIX (MONITORING SYSTEM SERVER) ON CLEAROS for clearos 6.4
    1. yum update
    2. yum install "Development Tools"
    3. yum install kernel-source kernel-headers gcc kernel-sourcecode
    4. enable Software Repository in web clearos 6 clearos-core
    5. yum install app-web-server rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple
    6. wget http://pkgs.repoforge.org/monitorix/monitorix-2.5.2-1.el5.rf.noarch.rpm
    rpm -ivh monitorix-2.5.2-1.el5.rf.noarch.rpm
    7. chmod 777 /etc/monitorix.conf
    8. vi /etc/monitorix.conf
    9. vi /etc/httpd/conf.d/monitorix.conf.
    10. Code: [Select]

    <Directory /usr/share/monitorix/cgi-bin/>
    DirectoryIndex monitorix.cgi
    Options ExecCGI
    order deny,allow
    deny from all
    allow from 127.0.0.1
    </Directory>

    to

    <Directory /usr/share/monitorix/cgi-bin/>
    DirectoryIndex monitorix.cgi
    Options ExecCGI
    order deny,allow
    allow from all
    allow from 127.0.0.1
    </Directory>

    11. service httpd restart
    10. service monitorix start
    12. http://ip_ClearOS/monitorix
    The reply is currently minimized Show
  • Accepted Answer

    Bob Morley
    Bob Morley
    Offline
    Monday, March 18 2013, 09:20 AM - #Permalink
    Resolved
    0 votes
    Interesting but cool side effect. :D
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, March 17 2013, 10:15 PM - #Permalink
    Resolved
    0 votes
    Installing this lead me to realizing I had a failed CPU fan. So, thanks. :)
    Replacement fan ordered.
    The reply is currently minimized Show
  • Accepted Answer

    Bob Morley
    Bob Morley
    Offline
    Saturday, March 16 2013, 02:51 PM - #Permalink
    Resolved
    0 votes
    That looks correct have you done service monitorix restart?

    It only looks at the .conf when i loads.
    The reply is currently minimized Show
  • Accepted Answer

    anwoke8204
    anwoke8204
    Offline
    Friday, March 15 2013, 11:56 PM - #Permalink
    Resolved
    0 votes
    how do I get it to show all my filesystems, I have the following in my config file:

    our @DISK_LIST = (
    "/dev/sda1",
    "/dev/sda2",
    "/dev/sda3",
    "/dev/sda4",
    "/dev/sda5",
    "/dev/sdb1",
    "/dev/sdc1",
    );


    my fdisk -l output is

    Disk /dev/sdb: 250.1 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x51595159

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 30401 244196001 83 Linux

    Disk /dev/sdc: 160.0 GB, 160041885696 bytes
    81 heads, 63 sectors/track, 61254 cylinders
    Units = cylinders of 5103 * 512 = 2612736 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xff7dcac3

    Device Boot Start End Blocks Id System
    /dev/sdc1 1 61255 156290872+ 83 Linux

    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0001d1d6

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 66 524288 83 Linux
    Partition 1 does not end on cylinder boundary.
    /dev/sda2 66 21100 168960000 83 Linux
    /dev/sda3 21100 60534 316752896 83 Linux
    /dev/sda4 60534 60802 2148352 5 Extended
    /dev/sda5 60535 60802 2146304 82 Linux swap / Solaris

    so I have all the hard drives in, but it only shows
    /
    Swap
    and /boot
    The reply is currently minimized Show
  • Accepted Answer

    Paul
    Paul
    Offline
    Friday, March 15 2013, 02:33 PM - #Permalink
    Resolved
    0 votes
    I am on 6.3 Got it all installed just have one issue now and its with "Filesystem usage and I/O activity"

    Edit

    Filesystem usage problem I think was caused by me trying the latest rpm from monitorix web site then uninstalling it and installing 2.5.2 which caused my /etc/monitorix.conf getting messed up. I uninstalled the rpm's deleted my config file and started from scratch again.
    The reply is currently minimized Show
  • Accepted Answer

    Bob Morley
    Bob Morley
    Offline
    Friday, March 15 2013, 02:29 PM - #Permalink
    Resolved
    0 votes
    Are you on ClearOS 5? If so I might have missed the stop on installing the webserver module.
    The reply is currently minimized Show
  • Accepted Answer

    Bob Morley
    Bob Morley
    Offline
    Friday, March 15 2013, 02:24 PM - #Permalink
    Resolved
    0 votes
    anwoke8204

    /etc/monitorix.conf




    # NET graph
    # -----------------------------------------------------------------------------
    our @NET_LIST = (
    "eth1",
    "ppp0",
    );
    our @NET_DESC = (
    "FastEthernet LAN",
    "80/20 VDSL",

    );
    our @NET_RIGID = (
    "0",
    "0",
    );
    our @NET_LIMIT = (
    "10000000",
    "8388608",

    );
    our $NET_GATEWAY = "ppp0";
    The reply is currently minimized Show
  • Accepted Answer

    Paul
    Paul
    Offline
    Friday, March 15 2013, 02:12 PM - #Permalink
    Resolved
    0 votes
    Ok I solved my perl-HTTP-Server-Simple by doing yum --enablerepo=rpmforge install perl-HTTP-Server-Simple

    I then got monitorix installed using monitorix-2.5.2-1.el6.rf.noarch.rpm

    So now have it all running and am starting to look at the config file to add my disks etc. Is not graphing "Filesystem usage and I/O activity" so need to investigate that next
    The reply is currently minimized Show
  • Accepted Answer

    Paul
    Paul
    Offline
    Friday, March 15 2013, 01:27 PM - #Permalink
    Resolved
    0 votes
    This sounded like fun so I thought I would give it a go unfortunately I fell at the first hurdle.

    yum install perl-HTTP-Server-Simple 
    Loaded plugins: clearcenter-marketplace, fastestmirror
    ClearCenter Marketplace: fetching repositories...
    Loading mirror speeds from cached hostfile
    * clearos: mirror2-houston.clearsdn.com
    * clearos-addons: mirror2-houston.clearsdn.com
    * clearos-core: mirror2-houston.clearsdn.com
    * clearos-extras: mirror2-houston.clearsdn.com
    * clearos-updates: mirror2-houston.clearsdn.com
    * contribs: download2.clearsdn.com
    * private-clearcenter-backuppc: download2.clearsdn.com:80
    * private-clearcenter-dyndns: download2.clearsdn.com:80
    * private-clearcenter-smart-monitor: download2.clearsdn.com:80
    * private-clearcenter-zarafa-community: download2.clearsdn.com:80
    Setting up Install Process
    No package perl-HTTP-Server-Simple available.
    Error: Nothing to do


    So where do I find perl-HTTP-Server-Simple?

    Also out of interest will this version work http://www.monitorix.org/monitorix-3.1.0-1.noarch.rpm or am I better off sticking with 2.5.2
    The reply is currently minimized Show
  • Accepted Answer

    Friday, March 15 2013, 12:14 PM - #Permalink
    Resolved
    0 votes
    Bob Morley wrote:
    Thanks for the info, chaps

    so you would suggest

    chkconfig monitorix on
    chkconfig httpd on

    http://linuxcommand.org/man_pages/chkconfig8.html
    chkconfig --list < shows whats what.

    chkconfig --add monitorix didnt throw any errors so its looking good.
    Do I need to --add the monitorix first ?

    Hmm, I don't really know the answer - I use ntsysv. I think it relies on the chkconfig parameters being correctly set.
    The reply is currently minimized Show
  • Accepted Answer

    anwoke8204
    anwoke8204
    Offline
    Friday, March 15 2013, 11:03 AM - #Permalink
    Resolved
    0 votes
    Bob Morley wrote:


    now you need to edit /etc/monitorix.conf
    Add your host name and your eth1,ppp0, adapters






    Where do I add eth1, ppp0 in the config file? I found the host name entry, but can't find where I put in the eth1 and ppp0
    The reply is currently minimized Show
  • Accepted Answer

    Bob Morley
    Bob Morley
    Offline
    Thursday, March 14 2013, 10:37 PM - #Permalink
    Resolved
    0 votes
    Thanks for the info, chaps

    so you would suggest

    chkconfig monitorix on
    chkconfig httpd on

    http://linuxcommand.org/man_pages/chkconfig8.html
    chkconfig --list < shows whats what.

    chkconfig --add monitorix didnt throw any errors so its looking good.
    Do I need to --add the monitorix first ?

    Tim, its rare I find that problem with my ClearOS boxes that you haven't already resolved. Thanks very much for all your help.

    chkconfig --list output


    auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
    avahi-daemon 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    blk-availability 0:off 1:on 2:on 3:on 4:on 5:on 6:off
    clamd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    clearsyncd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    dansguardian-av 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    dnsmasq 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    firewall 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    haldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off
    htcacheclean 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    l7-filter 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    lvm2-monitor 0:off 1:on 2:on 3:on 4:on 5:on 6:off
    mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    messagebus 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    monitorix 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
    network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    nmb 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    nscd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
    nslcd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
    ntpdate 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    openvpn 0:off 1:off 2:off 3:on 4:on 5:on 6:off
    portreserve 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    pppoe-server 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    rdisc 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    restorecond 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    rsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    saslauthd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    slapd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
    smb 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    snort 0:off 1:off 2:on 3:off 4:off 5:off 6:off
    snortsam 0:off 1:off 2:on 3:off 4:off 5:off 6:off
    squid 0:off 1:off 2:on 3:off 4:off 5:off 6:off
    sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    storage 0:off 1:on 2:on 3:on 4:on 5:on 6:off
    system-mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    syswatch 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    udev-post 0:off 1:on 2:on 3:on 4:on 5:on 6:off
    ventrilo 0:off 1:off 2:off 3:on 4:on 5:on 6:off
    webconfig 0:off 1:off 2:on 3:on 4:on 5:on 6:off
    winbind 0:off 1:off 2:off 3:on 4:on 5:on 6:off


    Just to give people some idea what your looking at. So different run levels have different systems starting up. For example you wouldn't really need smb(windows file sharing) starting on level 1, as you need to start the network which starts level2.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 14 2013, 09:29 PM - #Permalink
    Resolved
    0 votes
    Thanks for posting! I use Monitorix here too and it works well :)

    Default access is for localhost only (127.0.0.1) by adding all you are permitting any IP to access...you could restrict to just LAN subnets for example
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 14 2013, 09:23 PM - #Permalink
    Resolved
    0 votes
    To start something automatically, either use "ntsysv" or "chkconfig httpd on"
    The reply is currently minimized Show
Your Reply