Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #21  
Old 13th June 2008, 18:25
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,751 Times in 2,581 Posts
Default

Quote:
Originally Posted by lordshadow View Post
For Munin I ask above for the NTP plugin and posted the result as requested.
The NTP plugin seems to be gone. What you could do is set up munin on a second Debian system and then copy over the NTP plugin.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Sponsored Links
  #22  
Old 13th June 2008, 18:38
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Lucky for me I run Munin on at least 4 of my systems

This is the NTP config for the broadcast address 192.168.1.255

Code:
kayasaman@OptiplexGX110:/etc/munin/plugins$ cat ntp_192_168_1_255
#!/usr/bin/perl -w
#
# Plugin to monitor NTP statistics
#
# Parameters understood:
#
#       config   (required)
#       autoconf (optional - used by munin-node-configure)
#       suggest  (optional - used by munin-node-configure)
#
# Config variables:
#
#       lowercase       - lowercase hostnames after lookup
#
# $Log$
# Revision 1.4  2004/11/21 20:19:09  jimmyo
# Don't suggest localhost peer.
#
# Revision 1.3  2004/11/21 20:12:32  jimmyo
# Cosmetics.
#
# Revision 1.2  2004/11/21 19:55:28  jimmyo
# Upped generic/ntp_ to auto family.
#
# Revision 1.1  2004/11/21 19:35:23  jimmyo
# Corrected file name.
#
# Revision 1.2  2004/09/08 15:25:33  ilmari
# Use /usr/bin/perl in all perl shebang lines.
#
# Revision 1.1  2004/01/30 15:07:38  jimmyo
# Added generic plugins ntp_ and ntp_states to manual family (SF#887000).
#
#
#
#
# Magic markers - optional - used by installation scripts and
# munin-node-configure:
#
#%# family=auto
#%# capabilities=autoconf suggest
#

use strict;
use Net::hostent;
use Socket;

if ($ARGV[0] and $ARGV[0] eq "autoconf") {
        `ntpq -c help >/dev/null 2>/dev/null`;
        if ($? eq "0") {
                if (`ntpq -c "hostnames no" -c peers | wc -l` > 0) {
                        print "yes\n";
                        exit 0;
                } else {
                        print "no (unable to list peers)\n";
                        exit 1;
                }
        } else {
                print "no (ntpq not found)\n";
                exit 1;
        }
}

if ($ARGV[0] and $ARGV[0] eq "suggest") {
        my @lines = `ntpq -c "hostnames no" -c peers`;
        foreach (@lines) {
                next unless /^.(\d+\.\d+\.\d+\.\d+)/;
                next if /^.224\.0\.1\.1/;
                next if /^.127\./;
                my $addr = $1;
                my $name = gethostbyaddr(inet_aton($addr));
                $name = defined $name ? $name->name : $addr;
                $name = lc $name if exists $ENV{"lowercase"};
                $name =~ s/[\.-]/_/g;
                print $name, "\n";
        }
        exit 0;
}

$0 =~ /ntp_(.+)*$/;
my $name = $1;
exit 2 unless defined $name;

if ($ARGV[0] and $ARGV[0] eq "config") {
        my @lines = `ntpq -c "hostnames no" -c peers`;
        my $host;
        foreach (@lines) {
                next unless /^.(\d+\.\d+\.\d+\.\d+)/;
                next if /^.224\.0\.1\.1/;
                my $addr = $1;
                my $host = gethostbyaddr(inet_aton($addr));
                $host = defined $host ? $host->name : $addr;
                $host = lc $host if exists $ENV{"lowercase"};
                my $host_ = $host;
                $host_ =~ s/[\.-]/_/g;
                next unless $host_ eq $name;
                print "graph_title NTP statistics for peer $host\n";
        }
        print "graph_args --base 1000 --vertical-label msec --lower-limit 0\n";
        print "delay.label Delay\n";
        print "delay.draw LINE2\n";
        print "offset.label Offset\n";
        print "offset.draw LINE2\n";
        print "jitter.label Jitter\n";
        print "jitter.draw LINE2\n";
        exit 0;
}

my @lines = `ntpq -c "hostnames no" -c peers`;
foreach (@lines) {
        next unless /^.(\d+\.\d+\.\d+\.\d+)/;
        next if /^.224\.0\.1\.1/;
        my $addr = $1;
        my $host = gethostbyaddr(inet_aton($addr));
        $host = defined $host ? $host->name : $addr;
        $host = lc $host if exists $ENV{"lowercase"};
        $host =~ s/[\.-]/_/g;
        next unless $host eq $name;
        my @F = split;
        print <<"EOT";
delay.value $F[7]
offset.value $F[8]
jitter.value $F[9]
EOT
}

exit 0;

# vim:syntax=perl
However is this specific to one address as this is from my NTP server?
Reply With Quote
  #23  
Old 13th June 2008, 18:47
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To password webalizer would this file work:

Code:
AuthType Basic
AuthName "Members Only"
AuthUserFile /var/www/webalizer/.htpasswd
<limit GET PUT POST>
require valid-user
</limit>
Code:
htpasswd -c /var/www/webalizer/.htpasswd admin
where webalizer's dir is /var/www/webalizer???

The link posted previously said to do this: /var/www/www.example.com/web/monitoring

However that was for Munin!
Reply With Quote
  #24  
Old 13th June 2008, 19:25
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok sorted Munin out to the point were I restored the plugin and sym link:

Code:
lrwxrwxrwx 1 root root   29 2008-06-13 19:06 ntp_gx110_optiplex-networks_com -> /usr/share/munin/plugins/ntp_
However it still isn't graphing?? I restarted munin-node on both client and server machines.

Also just implemented the .htaccess file for webalizer as posted above, again not working
Reply With Quote
  #25  
Old 14th June 2008, 20:50
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,751 Times in 2,581 Posts
Default

Quote:
Originally Posted by lordshadow View Post
To password webalizer would this file work:

Code:
AuthType Basic
AuthName "Members Only"
AuthUserFile /var/www/webalizer/.htpasswd
<limit GET PUT POST>
require valid-user
</limit>
Code:
htpasswd -c /var/www/webalizer/.htpasswd admin
where webalizer's dir is /var/www/webalizer???

The link posted previously said to do this: /var/www/www.example.com/web/monitoring

However that was for Munin!
You should place .htpasswd outside the document root. Also, make sure that AllowOverride is set to All for this vhost.

Not sure about the munin problem...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #26  
Old 14th June 2008, 22:16
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It almost worked!

I got as far as the login but after entering user and pass, this message popped up:

Code:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
I made these changes to my virtual host file:
Code:
        ServerAdmin root@localhost

        DocumentRoot /var/www/
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                #RedirectMatch ^/$ /apache2-default/
        </Directory>
Reply With Quote
  #27  
Old 14th June 2008, 22:27
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Ok I figured this one out! I had the wrong dir in .htaccess

Thanks so much for everything!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASSP hook for Server Monitoring With munin And monit Slicer HOWTO-Related Questions 2 19th December 2006 21:38
Server Monitoring With munin And monit kdclaver Installation/Configuration 3 14th December 2006 19:52
Munin & Monit Hans Server Operation 16 6th November 2006 18:38
Extension for the monit and munin programs(tut from falko) ColdDoT Server Operation 7 4th May 2006 12:37
Server Monitoring With munin And monit - Page 2 Hans Server Operation 6 28th April 2006 17:17


All times are GMT +2. The time now is 00:01.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.