(0 - user rating)
(3 - user rating)

User Rating: 1 / 5

Star ActiveStar InactiveStar InactiveStar InactiveStar Inactive

Installing and Configuiring Nagio's for Network and Server Monitoring

Nagios screenshot 8 f3156

 

 I am very impressed with the power nagios displays in network monitoring. I may not be the simplest to setup perfectly but i have not ran acrossany limitations with it so far.  so i am willing to shar my setup and config files to save someone else alot of time in finnding a good way to organize and configuire there layout.

Centos 64 bit, 

 

 

 

 

 

 

Lets first create or set a 2gb swap file:

dd if=/dev/zero of=/swap bs=1024 count=2097152 mkswap /swap && chown root. /swap && chmod 0600 /swap && swapon /swap echo /swap swap swap defaults 0 0 >>

/etc/fstab echo vm.swappiness = 0 >> /etc/sysctl.conf && sysctl -p

Install Nagios

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmrpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpmyum -y install nagios nagios-plugins-all nagios-plugins-nrpe nrpe php httpdchkconfig httpd on ; chkconfig nagios on
 

No lets setup a nagios Password for the Control Panel:

htpasswd -c /etc/nagios/passwd nagiosadmin# keep the username "nagiosadmin"  the same to avoid any further issues

Install NRPE on Clients

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum -y install nagios nagios-plugins-all nrpe
chkconfig nrpe on

 Edit NRPE

nano /etc/nagios/nrpe.cfg

log_facility=daemon
pid_file=/var/run/nrpe/nrpe.pid
server_port=5666
nrpe_user=nrpe
nrpe_group=nrpe
allowed_hosts=198.211.117.251
dont_blame_nrpe=1
debug=0
command_timeout=60
connection_timeout=300
include_dir=/etc/nrpe.d/
command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/vda
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200
command[check_procs]=/usr/lib64/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$

 

Configuire IP Tables to accept traffic from all Monitoring Servers and nothing else:

iptables -N NRPE
iptables -I INPUT -s 0/0 -p tcp --dport 5666 -j NRPE
iptables -I NRPE -s 198.211.117.251 -j ACCEPT
iptables -A NRPE -s 0/0 -j DROP
/etc/init.d/iptables save

 

 Start NRPE

 service nrpe start

 

Configuiring the Monitoring server  (Nagios)

I wish to first say that in my defualt config on centos 6 all my config files are in /etc/nagios.  In my setup i have left those in there but added the real ones in /var/local/nagios and included the location in the real files ( you do not need to do this)

 

First edit the main /etc/nagios .   Then comment out the original folders and main files defualt location and add the folders where you want the configs to be.

nano /etc/nagioscfg_file=/etc/nagios/objects/commands.cfg
#cfg_file=/etc/nagios/objects/contacts.cfg
cfg_file=/etc/nagios/objects/timeperiods.cfg
#cfg_file=/etc/nagios/objects/templates.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
#cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
# Definitions for monitoring the local (Linux) host
cfg_file=/etc/nagios/objects/localhost.cfg

#cfg_dir=/etc/nagios/servers
#cfg_dir=/etc/nagios/printers
#cfg_dir=/etc/nagios/switches
#cfg_dir=/etc/nagios/routers
cfg_dir=/usr/local/nagios/etc/objects/CyfordTech/Windows
cfg_dir=/usr/local/nagios/etc/objects/CyfordTech/Router
cfg_dir=/usr/local/nagios/etc/objects/CyfordTech/Switch
cfg_dir=/usr/local/nagios/etc/objects/CyfordTech/Printer
cfg_dir=/usr/local/nagios/etc/objects/CyfordTech/Linux
cfg_dir=/usr/local/nagios/etc/objects/CyfordTech/External
cfg_dir=/etc/nagios/conf.d

 

Config files i believe is alot of work to really post on one website.   So instead i have created a virtual network for testing and i will give you access to my files. 

You can view and download my sample configs from

http://www.cyfordtechnologies.com/Downloads/objects

 

 

 

 

 

 

 

 

(1 - user rating)

User Rating: 1 / 5

Star ActiveStar InactiveStar InactiveStar InactiveStar Inactive

How to setup and Install Haproxy..

 Load balancer for servers 214bb

HaProxy is by far the fastest and best light wieght load balancer around in my book.  I have been using it for years and will always continue  to use it so i have decided to share my instalation proccess and example config files. Nowadays websites need a 99.999% up time which just isn't possible with 1 standalone server

CentOS 6 already has  HAProxy packages available under base repository

 

 

 

 

 

 

On CentOS/RHEL 5:

# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

 

Install HAProxy package using yum package manager from command line interface using following comamnd.

# yum install haproxy

Configuiring Haproxy

 

The config file for setting up and getting your loadbalancer (Haproxy) working is located in /etc/haproxy/haproxy.cfg

nano /etc/haproxy/haproxy.cfg

#---------------------------------------------------------------------
# Example configuration for a possible web application.  See the
# full configuration options online.
#
#   http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------

#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
    # to have these messages end up in /var/log/haproxy.log you will
    # need to:
    #
    # 1) configure syslog to accept network log events.  This is done
    #    by adding the '-r' option to the SYSLOGD_OPTIONS in
    #    /etc/sysconfig/syslog
    #
    # 2) configure local2 events to go to the /var/log/haproxy.log
    #   file. A line like the following can be added to
    #   /etc/sysconfig/syslog
    #
    #    local2.*                       /var/log/haproxy.log
    #
    log         127.0.0.1 local2

    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    user        haproxy
    group       haproxy
    daemon
       nbproc  1

    # turn on stats unix socket
    stats socket /var/lib/haproxy/stats

#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults

#tune.chksize 36384
 log global
 mode http
 option httplog
 option dontlognull
 retries 3
 balance roundrobin
 option redispatch
 option forwardfor
 option forceclose        # Slows the connection
 maxconn 10000
 contimeout 30000
 clitimeout 40000
 srvtimeout 55000
 stats enable     # enables you to see the stats from a webpage 
 stats auth admin:98!n567ehny!&*

#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------


option httpchk GET /index.php HTTP/1.1\r\nHost:\ www.cyfordtechnologies.com

frontend all 0.0.0.0:80 # Listens on all ip address on  port 80

reqidel ^X-Forwarded-For:.*   #  It uses the client ip address instead of letting the webserver know the request came from haproxy..  good more analysing web traffic
option forwardfor
 acl acl_mail.cyfordtechnologies.com hdr_dom(host) -i mail.cyfordtechnologies.com
 acl acl_www.cyfordtechnologies.com hdr_dom(host) -i www.cyfordtechnologies.com

 acl acl_seo.cyfordtechnologies.com hdr_dom(host) -i seo.cyfordtechnologies.com
 acl acl_Extranet.cyfordtechnologies.com hdr_dom(host) -i Extranet.cyfordtechnologies.com
 acl acl_genconinc.net hdr_dom(host) -i genconinc.net
 acl acl_www.heavensgateguild.com hdr_dom(host) -i heavensgateguild.com
 acl acl_test.cyfordtechnologies.com hdr_dom(host) -i test.cyfordtechnologies.com
 acl acl_extendeucandvraptoday.com hdr_dom(host) -i      extendeucandvraptoday.com
 acl acl_lifesbasics.net hdr_dom(host) -i      lifesbasics.net
 acl acl_lifesbasics.org hdr_dom(host) -i      lifesbasics.org
 acl acl_todayssocialissues.com hdr_dom(host) -i      todayssocialissues.com
 acl acl_sample.cyfordtechnologies.com hdr_dom(host) -i  sample.cyfordtechnologies.com
 acl acl_sample.cyfordtechnologies.com hdr_dom(host) -i  onlinemerchantshop.com
 acl acl_sample.cyfordtechnologies.com hdr_dom(host) -i  gottires.com


 use_backend www.cyfordtechnologies.com if acl_www.cyfordtechnologies.com
 use_backend mail.cyfordtechnologies.com if acl_mail.cyfordtechnologies.com
 use_backend www.cyfordtechnologies.com if acl_seo.cyfordtechnologies.com
 use_backend www.cyfordtechnologies.com if acl_Extranet.cyfordtechnologies.com
 use_backend www.cyfordtechnologies.com if acl_genconinc.net
 use_backend Hosting   if acl_www.heavensgateguild.com
 use_backend www.cyfordtechnologies.com if acl_test.cyfordtechnologies.com
 use_backend Hosting if acl_extendeucandvraptoday.com
 use_backend Hosting if acl_lifesbasics.net
 use_backend Hosting if acl_lifesbasics.org
 use_backend Hosting if acl_todayssocialissues.com
 use_backend www.cyfordtechnologies.com if acl_sample.cyfordtechnologies.com


#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------

# I use mynmain websites in the first pool and usually seperate clients and others  incase they move around or mine move around.  i also load balanced a couple of reverse proxy servers. which uses port 3128

# Of course you would need to change the ip address  to the ip of your servers


backend www.cyfordtechnologies.com
balance roundrobin
 cookie SRVID insert indirect nocache
    server 01-CachServer_www.cyfordtechnologies.com-3128 192.168.22.8:3128  weight 10 maxconn 200 check inter 10500
    server 00-CachServer_www.cyfordtechnologies.com-3128 192.168.22.7:3128   weight 10 maxconn 200 check inter 10500
    server 01-CachServer_www.cyfordtechnologies.com-80 192.168.22.8:80   weight 17 maxconn 200 check inter 10500
    server 00-CachServer_www.cyfordtechnologies.com-80 192.168.22.7:80   weight 17 maxconn 200 check inter 10500
    server web00_www.cyfordtechnologies.com 192.168.22.150:80 cookie SRVID  weight 15 maxconn  100 check inter 15000
    server web01_www.cyfordtechnologies.com 192.168.22.151:80 cookie SRVID  weight 15 maxconn  100 check inter 15000
    server web02_www.cyfordtechnologies.com 192.168.22.152:80 cookie SRVID  weight 50 maxconn  100 check inter 15000  
    #server HostMonster_www.cyfordtechnologies.com 74.220.22.77:80 cookie SRVID  weight 5 maxconn 5 check backup inter 15000
option redispatch # send back to dispatch in case of connection failure
#option abortonclose
option forceclose

backend www.gottires.com
balance roundrobin
 cookie SRVID insert indirect nocache
    server www.gottires.com 192.168.111.32:80 cookie SRVID  weight 15 maxconn  100 check inter 15000  
    #server HostMonster_www.cyfordtechnologies.com 74.220.215.77:80 cookie SRVID  weight 5 maxconn 5 check backup inter 15000
option redispatch # send back to dispatch in case of connection failure
#option abortonclose
option forceclose


backend Hosting
balance roundrobin
 cookie SRVID insert indirect nocache
    server web00_www.cyfordtechnologies.com 192.168.44.150:80 cookie SRVID  weight 15 maxconn  100 check inter 15000
    server web01_www.cyfordtechnologies.com 192.168.44.151:80 cookie SRVID  weight 15 maxconn  100 check inter 15000
    server web02_www.cyfordtechnologies.com 192.168.44.152:80 cookie SRVID  weight 50 maxconn  100 check inter 15000
    #server HostMonster_www.cyfordtechnologies.com 74.220.215.77:80 cookie SRVID  weight 5 maxconn 5 check backup inter 15000
option redispatch # send back to dispatch in case of connection failure
#option abortonclose
option forceclose


backend mail.cyfordtechnologies.com
 server srv_mail.cyfordtechnologies.com 192.168.22.110:80 weight 10 maxconn  100  inter 20000
option abortonclose

backend www.heavensgateguild.com
 server 00-CachServer_www.cyfordtechnologies.com-3128 192.168.33.7:3128  weight 10 maxconn 200 check inter 10500
 server 01-CachServer_www.cyfordtechnologies.com-3128 192.168.33.8:3128  weight 10 maxconn 200 check inter 10500
 server web_www.cyfordtechnologies.com 192.168.33.150:80 cookie SRVID  weight 9 maxconn  100 check backup inter 15000
option abortonclose
option redispatch



Start Haproxy and make it start with system boot


# service haproxy start ; chkconfig haproxy on

(1 - user rating)

User Rating: 1 / 5

Star ActiveStar InactiveStar InactiveStar InactiveStar Inactive

ninja 21dbeI seen alot of blogs on how to setup your freepbx script.  so i have decided to make a custom install script that should mostlly automate the prosses for beginners or people having a difficult time it fixies most errors people running into and soon will give an option on which versions and os detection. so far this script has been tested with xenserver vm's and RackSpace vm's which had centos 6.5 and lower

 

I will soon have it where you get options to specialize your installation.

 ( Work In Progress )

 

 

 

How to run the script

First Register

Second Download

wget http://www.cyfordtechnologies.com/category/2-asterisk?download=8%3Afreepbx-install-script -O Freepbx.sh

Third run

bash Freepbx.sh

(1 - user rating)

User Rating: 1 / 5

Star ActiveStar InactiveStar InactiveStar InactiveStar Inactive

how to setup install and configuire bacula for your companies  backup systems

(1 - user rating)

User Rating: 1 / 5

Star ActiveStar InactiveStar InactiveStar InactiveStar Inactive

550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1)

How to fix:

 

 

This error means that there is no reverse DNS look-up for the domain sending the helo.

To fix this setup your host name correctly with a valid host.domain.com and go to the authorized dns server for that  domain and create a A record which points to the corresponding IP Address

 

Subcategories

YOUR SUCCESS IS OUR SUCCESS

 

 

OUR BUSINESS MANAGEMENT

Maecenas et faucibus arcu. Quisque congue diam ac vulputate finibus. Fusce sed neque dictum, porta sapien quis, vehicula orci.

management1 f9b07

CHAIRMAN

Lorem ipsum dolor sit amet cursus consectetur adipiscing elit curabitur maximus augue consectetur.

management2 b741d

DIRECTOR

Lorem ipsum dolor sit amet cursus consectetur adipiscing elit curabitur maximus augue consectetur.

management3 b694d

PRESIDENT

Lorem ipsum dolor sit amet cursus consectetur adipiscing elit curabitur maximus augue consectetur.

management4 b4f56

MANAGER

Lorem ipsum dolor sit amet cursus consectetur adipiscing elit curabitur maximus augue consectetur.

management5 daffa

SUPERVISOR

Lorem ipsum dolor sit amet cursus consectetur adipiscing elit curabitur maximus augue consectetur.

management6 00f9d

ACCOUNTANT

Lorem ipsum dolor sit amet cursus consectetur adipiscing elit curabitur maximus augue consectetur.

management7 5e1be

LAWYER

Lorem ipsum dolor sit amet cursus consectetur adipiscing elit curabitur maximus augue consectetur.

management8 2fab9

TEAM LEADER

 

Lorem ipsum dolor sit amet cursus consectetur adipiscing elit curabitur maximus augue consectetur.

$489.00 each Cyford PBX Phone System
5 5 1 Product
Item not sold anymore
$489.00 each Cyford PBX Phone System
5 5 1 Product
Item not sold anymore
$489.00 each Cyford PBX Phone System
5 5 1 Product
Item not sold anymore
$489.00 each Cyford PBX Phone System
5 5 1 Product
Item not sold anymore