Notes:


All these tasks are performed as root.


Installing Smokeping


Part 1 – installation


Smokeping requires a webserver in order to display it's results. That's a dependency we should have satisfied already.


To install:


apt-get install smokeping


the package installs it's various bits in locations consistent with the debian model


Configuration files live in:


/etc/smokeping


the smokeping cgi goes in:


/usr/lib/cgi-bin


the probe data goes in:


/var/lib/smokeping/


The various bits that don't change like documentation and perl modules live under:


/usr/share/


Part 2 - Configuration


take a look at:


/etc/smokeping/config


The stanzas towards to bottom define what hosts we're going to look at and what sort of tests we are going to run against them.


Recreate the local section with something like this:


+ Local

menu = Local

title = Local Network

++ localhost

menu = Local Machine

title = localhost

host = 127.0.0.1

++ gateway

menu = first hop gateway

title = 202.65.42.252

host = 202.65.42.252


Add another host for one of your neighbors pc's.


Replace the remark:


remark = Welcome to the SmokePing website of 'A poorly mantained site running Debian.'


With something a little more appropriate to your instance of smokeping.


Part 4 – optional targets


202.65.42.240

202.65.42.241


Part 5 – optional probes


look in /usr/share/doc/smokeping/html/Smokeping/probes


what optional probes could you deploy to test services on the NOC server?


Installing Nagios:


Part 1 – Installation


To install:


apt-get install nagios


note that you get several options in terms of doing what simplest


apt-get install nagios-text


It will prompt you at some point to create a password. This is the password for the nagios admin user.


Doesn't require that you configure a database backend.


Restart your apache server.


/etc/init.d/apache2 restart


go to:


http://localhost/nagios or your system ip address/nagios


the login is nagiosadmin for the username and the password you created for the password.


Part 2 - configuration


Take a look at the configuration in /etc/nagios


Note that the Nagios documentation is available from the Nagios interface.


You'll see that the installation process has created one host (local router attached to the subnet) to be monitored we're going to create another.


In the hosts.cfg below the default gateway host definition lets create a new host definition.


define host{

use generic-host ; Name of host template to use


host_name server

alias meeting server

address 202.65.42.252

check_command check-host-alive

max_check_attempts 20

notification_interval 60

notification_period 24x7

notification_options d,u,r

}


Once we have the host configured we need to add it to a hostgroup, this is how we begin to identify which hosts are related to each other and who needs to be notified.


After the default gateway host group definition lets create our own:


define hostgroup{

hostgroup_name servers

alias servers

contact_groups server-admins

members server

}


Then we need to add the service that we want to monitor to the services.cfg, below the service designed to ping the gateway add a new stanza:


define service{

use generic-service ; Name of service template to use


host_name server

service_description PING

is_volatile 0

check_period 24x7

max_check_attempts 3

normal_check_interval 5

retry_check_interval 1

contact_groups router-admins

notification_interval 240

notification_period 24x7

notification_options c,r

check_command check_ping!100.0,20%!500.0,60%

}


Lastly we need to create the server-admins group in the contactgroups.cfg. below the router-admins contact group lets create a new one:


#server admins

define contactgroup{

contactgroup_name server-admins

alias Server Admins

members nagios

}


note that the only member currently is nagios. Addtional contacts can be defined in the contacts.cfg and they have a format similar to the following:


define contact{
        contact_name                    jdoe
        alias                           John Doe
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-by-email
        host_notification_commands      host-notify-by-email
        email                           jdoe@localhost.localdomain
        pager                           555-5555@pagergateway.localhost.localdomain
        }

Nagios could even be configured to send mail into trac.


Remember to restart Nagios for these changes to take effect


/etc/init.d/nagios restart



Trac


Part 1 – installation


trac install should be something you're familiar with by now.


apt-get install trac


cd /var/


mkdir trac


cd trac


mkdir my-trac-project


trac-admin /var/trac/my-trac-project initenv


part 2 - 1st launch


to try out trac:


tracd --port 8000 /var/trac/my-trac-project


point your web browser at:


http://localhost:8000 our your systems or remotely ipaddress:8000


and you should get the track interface.


Look around...


part 3 – trac and apache


Getting trac to run within apache:


add the following to the bottom of the apache2.conf in /etc/apache2


ScriptAlias /trac /usr/share/trac/cgi-bin/trac.cgi

<Location "/trac">

SetEnv TRAC_ENV "/var/trac/my-trac-project"

# AuthType Basic

# AuthName "trac"

# AuthUserFile /var/trac/my-trac-project/db/passwd

# Require valid-user

</Location>


Reload apache...


/etc/init.d/apache2 restart


You'll notice if you go to http://localhost/trac that you'll get a fairly horrible error message that complains about permissions.


In /var/trac/ you need to do:


chown -R www-data my-trac-project


to give the www-data user ownership of all of the trac data.


Now you can visit the trac url again and it should work.


Why leverage apache instead of the trac web server... Better performance, apache security and options more trustworthy, better intergration with other web-services, can leverage apache ssl support to wrap your trac instance.


Part 4 – customizing trac


Trac environment is configured for each trac instance in the trac.ini located in this case in:


/var/trac/my-trac-project/conf


edit the trac.ini and in the [project] section change the description and name to something more relevant to this particular installation. Save the trac.ini


You note in scrolling past that in the notification section smtp is not currently enabled, but it is a critical component in many ticketing systems for tracking changes and updating tickets.

The administration interface is where values associated with the ticketing systems can be changed.


You can invoke it by doing:


trac-admin /var/trac/my-trac-project/


Not all fields are relevant to ISP's but we can practice updating the most important one's.


component list


Name Owner

--------------------

component1 somebody

component2 somebody


remove the example components


component remove component1

component remove component2


add some news one's


component add modems modem-admin

component add webserver web-admin

component add nameserver joelja

component add network noc

component add accounting accountants


etc...



ticket_type list


Possible Values

---------------

defect

enhancement

task


ticket_type remove defect


ticket_type add outage

ticket_type add service_request

ticket_type add billing


severity list


it's empty


severity add fyi

severity add hosed

severity add biz-critical

severity add bothersome

severity add not_a_problem


now that we've done that take a look at the ticketing system and see how the form has been updated.


Part 5 – freshening up the the wiki (Optional)


The trac wiki supports a formatting style known as camelcase. The instructions for trac formating can be found locally here:


http://localhost/trac/wiki/WikiFormatting


you can customize the top level page as desired for your application.


Part 6 – Enable authetication (Optional)


To require authentication on the Trac wiki for all portions of the interface uncomment the four lines we inserted commented out in the apache2.conf.


You will need to create the password file in /var/trac/my-trac-project/db/passwd.


You can create the file with the apache htpasswd command


httpasswd username /var/trac/my-trac-project/db/passwd


Will prompt you to create a password for that username and subsequent issuance of the command with different usernames will populate the password file with additional accounts.