initial commit of file from CVS for smeserver-smeadmin on Sat Sep 7 16:42:16 AEST 2024
This commit is contained in:
parent
8c8dee10b7
commit
b2c3a12510
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
*.rpm
|
||||||
|
*.log
|
||||||
|
*spec-20*
|
||||||
|
*.tar.gz
|
21
Makefile
Normal file
21
Makefile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Makefile for source rpm: smeserver-smeadmin
|
||||||
|
# $Id: Makefile,v 1.1 2020/10/28 16:52:18 jcrisp Exp $
|
||||||
|
NAME := smeserver-smeadmin
|
||||||
|
SPECFILE = $(firstword $(wildcard *.spec))
|
||||||
|
|
||||||
|
define find-makefile-common
|
||||||
|
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||||
|
|
||||||
|
ifeq ($(MAKEFILE_COMMON),)
|
||||||
|
# attept a checkout
|
||||||
|
define checkout-makefile-common
|
||||||
|
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(MAKEFILE_COMMON)
|
16
README.md
16
README.md
@ -1,3 +1,15 @@
|
|||||||
# smeserver-smeadmin
|
# <img src="https://www.koozali.org/images/koozali/Logo/Png/Koozali_logo_2016.png" width="25%" vertical="auto" style="vertical-align:bottom"> smeserver-smeadmin
|
||||||
|
|
||||||
SMEServer Koozali developed git repo for smeserver-smeadmin smecontribs
|
SMEServer Koozali developed git repo for smeserver-smeadmin smecontribs
|
||||||
|
|
||||||
|
## Wiki
|
||||||
|
<br />https://wiki.koozali.org/Smeadmin
|
||||||
|
|
||||||
|
## Bugzilla
|
||||||
|
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-smeadmin&product=SME%20Contribs&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
|
||||||
|
*Once it has been checked, then this comment will be deleted*
|
||||||
|
<br />
|
||||||
|
1363
additional/po/bg/smeadmin.po
Normal file
1363
additional/po/bg/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1363
additional/po/da/smeadmin.po
Normal file
1363
additional/po/da/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1364
additional/po/de/smeadmin.po
Normal file
1364
additional/po/de/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/el/smeadmin.po
Normal file
1359
additional/po/el/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/es/smeadmin.po
Normal file
1359
additional/po/es/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/et/smeadmin.po
Normal file
1359
additional/po/et/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1363
additional/po/fr/smeadmin.po
Normal file
1363
additional/po/fr/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/he/smeadmin.po
Normal file
1359
additional/po/he/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/hu/smeadmin.po
Normal file
1359
additional/po/hu/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1358
additional/po/id/smeadmin.po
Normal file
1358
additional/po/id/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1393
additional/po/it/smeadmin.po
Normal file
1393
additional/po/it/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/ja/smeadmin.po
Normal file
1359
additional/po/ja/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/nb/smeadmin.po
Normal file
1359
additional/po/nb/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1370
additional/po/nl/smeadmin.po
Normal file
1370
additional/po/nl/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/pl/smeadmin.po
Normal file
1359
additional/po/pl/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1360
additional/po/pt/smeadmin.po
Normal file
1360
additional/po/pt/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/pt_BR/smeadmin.po
Normal file
1359
additional/po/pt_BR/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/ro/smeadmin.po
Normal file
1359
additional/po/ro/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/ru/smeadmin.po
Normal file
1359
additional/po/ru/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/sl/smeadmin.po
Normal file
1359
additional/po/sl/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1362
additional/po/sv/smeadmin.po
Normal file
1362
additional/po/sv/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1365
additional/po/th/smeadmin.po
Normal file
1365
additional/po/th/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1359
additional/po/tr/smeadmin.po
Normal file
1359
additional/po/tr/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1360
additional/po/zh_CN/smeadmin.po
Normal file
1360
additional/po/zh_CN/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1358
additional/po/zh_TW/smeadmin.po
Normal file
1358
additional/po/zh_TW/smeadmin.po
Normal file
File diff suppressed because it is too large
Load Diff
1
contriborbase
Normal file
1
contriborbase
Normal file
@ -0,0 +1 @@
|
|||||||
|
contribs10
|
41
createlinks
Normal file
41
createlinks
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#! /usr/bin/perl -w
|
||||||
|
|
||||||
|
use esmith::Build::CreateLinks qw(:all);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Links for the panel
|
||||||
|
panel_link("smeadmin", "manager");
|
||||||
|
#system("mkdir -p root/etc/e-smith/web/panels/manager/html/smeadmin");
|
||||||
|
safe_symlink("/etc/e-smith/web/panels/manager/html/smeadmin", "root/etc/e-smith/web/panels/user/html/smeadmin");
|
||||||
|
|
||||||
|
# Logrotate
|
||||||
|
event_link("smeadmin-parselog","logrotate","15");
|
||||||
|
#Creation of the event smeadmin-update
|
||||||
|
for my $event (qw(
|
||||||
|
smeadmin-update
|
||||||
|
smeserver-smeadmin-update
|
||||||
|
))
|
||||||
|
|
||||||
|
{
|
||||||
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init");
|
||||||
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smeadmind");
|
||||||
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/lm_sensors");
|
||||||
|
}
|
||||||
|
#integration of event for console-save & bootstrap-console-save
|
||||||
|
for my $event (qw(
|
||||||
|
console-save
|
||||||
|
))
|
||||||
|
|
||||||
|
{
|
||||||
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smeadmind");
|
||||||
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/lm_sensors");
|
||||||
|
}
|
||||||
|
|
||||||
|
#expand template
|
||||||
|
templates2events("/etc/e-smith/sql/init/smeadmin", "smeserver-smeadmin-update");
|
||||||
|
|
||||||
|
use esmith::Build::Backup qw(:all);
|
||||||
|
backup_includes("smeserver-smeadmin", qw(
|
||||||
|
/var/lib/smeadmin/
|
||||||
|
));
|
@ -0,0 +1 @@
|
|||||||
|
enabled
|
@ -0,0 +1 @@
|
|||||||
|
service
|
@ -0,0 +1 @@
|
|||||||
|
admin
|
@ -0,0 +1 @@
|
|||||||
|
smeadmin
|
@ -0,0 +1 @@
|
|||||||
|
pass
|
@ -0,0 +1 @@
|
|||||||
|
smeadmin
|
@ -0,0 +1 @@
|
|||||||
|
PNG
|
@ -0,0 +1 @@
|
|||||||
|
250
|
@ -0,0 +1 @@
|
|||||||
|
500
|
@ -0,0 +1 @@
|
|||||||
|
1
|
@ -0,0 +1 @@
|
|||||||
|
4
|
@ -0,0 +1 @@
|
|||||||
|
2
|
@ -0,0 +1 @@
|
|||||||
|
50
|
@ -0,0 +1 @@
|
|||||||
|
60
|
@ -0,0 +1 @@
|
|||||||
|
1
|
@ -0,0 +1 @@
|
|||||||
|
40
|
@ -0,0 +1 @@
|
|||||||
|
40
|
@ -0,0 +1 @@
|
|||||||
|
5
|
@ -0,0 +1 @@
|
|||||||
|
5
|
@ -0,0 +1 @@
|
|||||||
|
5
|
@ -0,0 +1 @@
|
|||||||
|
2
|
@ -0,0 +1 @@
|
|||||||
|
1
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
www.google.fr
|
@ -0,0 +1 @@
|
|||||||
|
temp1
|
@ -0,0 +1 @@
|
|||||||
|
temp2
|
@ -0,0 +1 @@
|
|||||||
|
fan1
|
@ -0,0 +1 @@
|
|||||||
|
3
|
@ -0,0 +1 @@
|
|||||||
|
admin
|
@ -0,0 +1 @@
|
|||||||
|
off
|
1
root/etc/e-smith/db/configuration/defaults/smeadmind/hd1
Normal file
1
root/etc/e-smith/db/configuration/defaults/smeadmind/hd1
Normal file
@ -0,0 +1 @@
|
|||||||
|
sda
|
1
root/etc/e-smith/db/configuration/defaults/smeadmind/hd2
Normal file
1
root/etc/e-smith/db/configuration/defaults/smeadmind/hd2
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
enabled
|
@ -0,0 +1 @@
|
|||||||
|
service
|
139
root/etc/e-smith/db/configuration/migrate/smeadmin
Normal file
139
root/etc/e-smith/db/configuration/migrate/smeadmin
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
{
|
||||||
|
use MIME::Base64 qw(encode_base64);
|
||||||
|
|
||||||
|
my $smeadmindb = $DB->get('smeadmind') || $DB->new_record("smeadmind",{type=>'service'});
|
||||||
|
|
||||||
|
$pw = "not set due to error";
|
||||||
|
|
||||||
|
if ( open( RANDOM, "/dev/urandom" ) ){
|
||||||
|
my $buf;
|
||||||
|
if ( read( RANDOM, $buf, 25 ) != 25 ){
|
||||||
|
warn("Short read from /dev/random: $!");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$pw = encode_base64($buf);
|
||||||
|
chomp $pw;
|
||||||
|
}
|
||||||
|
close RANDOM;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
warn "Could not open /dev/urandom: $!";
|
||||||
|
}
|
||||||
|
|
||||||
|
# let's migrate sme9admind values to smeadmind
|
||||||
|
if ( defined $sme9admind && ! defined $smeadmind ) {
|
||||||
|
for my $propertie (keys %sme9admind) {
|
||||||
|
next if $propertie eq "DbName" || $propertie eq "DbUser";
|
||||||
|
$smeadmindb->set_prop($propertie, $sme9admind{$propertie});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$smeadmindb->set_prop('DbPassword', $pw) if not $smeadmindb->prop('DbPassword');
|
||||||
|
|
||||||
|
if ( -e "/etc/e-smith/web/panels/manager/html/smeadmin/_smeadmin.conf" ){
|
||||||
|
open(CONF,"</etc/e-smith/web/panels/manager/html/smeadmin/_smeadmin.conf");
|
||||||
|
my @confs = <CONF>;
|
||||||
|
close(CONF);
|
||||||
|
foreach (@confs){
|
||||||
|
foreach my $key (qw(
|
||||||
|
db_database
|
||||||
|
db_password
|
||||||
|
db_username
|
||||||
|
img_format
|
||||||
|
img_width
|
||||||
|
img_height
|
||||||
|
other_mail_address_domains
|
||||||
|
ping_target
|
||||||
|
hddtemp_first_hd
|
||||||
|
hddtemp_second_hd
|
||||||
|
du_enabled
|
||||||
|
sensors_first_temp_tag
|
||||||
|
sensors_second_temp_tag
|
||||||
|
sensors_fan_tag
|
||||||
|
limit_pppoe_disconnection
|
||||||
|
limit_pppoe_duration
|
||||||
|
limit_vpn_duration
|
||||||
|
mail_alert_recipient
|
||||||
|
mail_status_recipient
|
||||||
|
mail_status_delay_between
|
||||||
|
max_mail_in
|
||||||
|
max_mail_out
|
||||||
|
max_hd_used
|
||||||
|
max_cpu_total
|
||||||
|
max_temp_hard
|
||||||
|
max_temp_hd
|
||||||
|
max_sessions_samba
|
||||||
|
max_sessions_ssh
|
||||||
|
max_sessions_ftp
|
||||||
|
max_sessions_vpn
|
||||||
|
)){
|
||||||
|
# valeur = partie droite de la ligne contenant $key dans le fichier
|
||||||
|
if ($_ =~ /\s*$key\s*=\s*(.*)/){
|
||||||
|
$params{$key} = $1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# Si la valeur dans la db est diférente de la valeur trouve dans le fichier, alors on met a jour la db
|
||||||
|
$smeadmindb->set_prop('DbName',$params{'db_database'});
|
||||||
|
# if ($smeadmindb->prop('DbName') ne $params{'db_database'});
|
||||||
|
$smeadmindb->set_prop('DbPassword',$params{'db_password'});
|
||||||
|
# if ($smeadmindb->prop('DbPassword') ne $params{'db_password'});
|
||||||
|
$smeadmindb->set_prop('DbUser',$params{'db_username'});
|
||||||
|
# if ($smeadmindb->prop('DbUser') ne $params{'db_username'});
|
||||||
|
$smeadmindb->set_prop('ImgFormat',$params{'img_format'});
|
||||||
|
# if ($smeadmindb->prop('ImgFormat') ne $params{'img_format'});
|
||||||
|
$smeadmindb->set_prop('ImgWidth',$params{'img_width'});
|
||||||
|
# if ($smeadmindb->prop('ImgWidth') ne $params{'img_width'});
|
||||||
|
$smeadmindb->set_prop('ImgHeight',$params{'img_height'});
|
||||||
|
# if ($smeadmindb->prop('ImgHeight') ne $params{'img_height'});
|
||||||
|
$smeadmindb->set_prop('OtherMailDomains',$params{'other_mail_address_domains'});
|
||||||
|
# if ($smeadmindb->prop('OtherMailDomains') ne $params{'other_mail_address_domains'});
|
||||||
|
$smeadmindb->set_prop('PingTarget',$params{'ping_target'});
|
||||||
|
# if ($smeadmindb->prop('PingTarget') ne $params{'ping_target'});
|
||||||
|
$smeadmindb->set_prop('hd1',$params{'hddtemp_first_hd'});
|
||||||
|
# if ($smeadmindb->prop('hd1') ne $params{'hddtemp_first_hd'});
|
||||||
|
$smeadmindb->set_prop('hd2',$params{'hddtemp_second_hd'});
|
||||||
|
# if ($smeadmindb->prop('hd2') ne $params{'hddtemp_second_hd'});
|
||||||
|
$smeadmindb->set_prop('UseDu',$params{'du_enabled'});
|
||||||
|
# if ($smeadmindb->prop('UseDu') ne $params{'du_enabled'});
|
||||||
|
$smeadmindb->set_prop('SensorsTag1',$params{'sensors_first_temp_tag'});
|
||||||
|
# if ($smeadmindb->prop('SensorsTag1') ne $params{'sensors_first_temp_tag'});
|
||||||
|
$smeadmindb->set_prop('SensorsTag2',$params{'sensors_second_temp_tag'});
|
||||||
|
# if ($smeadmindb->prop('SensorsTag2') ne $params{'sensors_second_temp_tag'});
|
||||||
|
$smeadmindb->set_prop('SensorsTagFan',$params{'sensors_fan_tag'});
|
||||||
|
# if ($smeadmindb->prop('SensorsTagFan') ne $params{'sensors_fan_tag'});
|
||||||
|
$smeadmindb->set_prop('LimitPppoeDisconnect',$params{'limit_pppoe_disconnection'});
|
||||||
|
# if ($smeadmindb->prop('LimitPppoeDisconnect') ne $params{'limit_pppoe_disconnection'});
|
||||||
|
$smeadmindb->set_prop('LimitPppoeDuration',$params{'limit_pppoe_duration'});
|
||||||
|
# if ($smeadmindb->prop('LimitPppoeDuration') ne $params{'limit_pppoe_duration'});
|
||||||
|
$smeadmindb->set_prop('LimitVpnDuration',$params{'limit_vpn_duration'});
|
||||||
|
# if ($smeadmindb->prop('LimitVpnDuration') ne $params{'limit_vpn_duration'});
|
||||||
|
$smeadmindb->set_prop('AlertMailRecipient',$params{'mail_alert_recipient'});
|
||||||
|
# if ($smeadmindb->prop('AlertMailRecipient') ne $params{'mail_alert_recipient'});
|
||||||
|
$smeadmindb->set_prop('StatusMailRecipient',$params{'mail_status_recipient'});
|
||||||
|
# if ($smeadmindb->prop('StatusMailRecipient') ne $params{'mail_status_recipient'});
|
||||||
|
$smeadmindb->set_prop('StatusInterval',$params{'mail_status_delay_between'});
|
||||||
|
# if ($smeadmindb->prop('StatusInterval') ne $params{'mail_status_delay_between'});
|
||||||
|
$smeadmindb->set_prop('MaxMailIn',$params{'max_mail_in'});
|
||||||
|
# if ($smeadmindb->prop('MaxMailIn') ne $params{'max_mail_in'});
|
||||||
|
$smeadmindb->set_prop('MaxMailOut',$params{'max_mail_out'});
|
||||||
|
# if ($smeadmindb->prop('MaxMailOut') ne $params{'max_mail_out'});
|
||||||
|
$smeadmindb->set_prop('MaxDiskSpace',$params{'max_hd_used'});
|
||||||
|
# if ($smeadmindb->prop('MaxDiskSpace') ne $params{'max_hd_used'});
|
||||||
|
$smeadmindb->set_prop('MaxCpu',$params{'max_cpu_total'});
|
||||||
|
# if ($smeadmindb->prop('MaxCpu') ne $params{'max_cpu_total'});
|
||||||
|
$smeadmindb->set_prop('MaxHwTemp',$params{'max_temp_hard'});
|
||||||
|
# if ($smeadmindb->prop('MaxHwTemp') ne $params{'max_temp_hard'});
|
||||||
|
$smeadmindb->set_prop('MaxSamba',$params{'max_sessions_samba'});
|
||||||
|
# if ($smeadmindb->prop('MaxSamba') ne $params{'max_sessions_samba'});
|
||||||
|
$smeadmindb->set_prop('MaxSsh',$params{'max_sessions_ssh'});
|
||||||
|
# if ($smeadmindb->prop('MaxSsh') ne $params{'max_sessions_ssh'});
|
||||||
|
$smeadmindb->set_prop('MaxFtp',$params{'max_sessions_ftp'});
|
||||||
|
# if ($smeadmindb->prop('MaxFtp') ne $params{'max_sessions_ftp'});
|
||||||
|
$smeadmindb->set_prop('MaxVpn',$params{'max_sessions_vpn'});
|
||||||
|
# if ($smeadmindb->prop('MaxVpn') ne $params{'max_sessions_vpn'});
|
||||||
|
system("/bin/mv /etc/e-smith/web/panels/manager/html/smeadmin/_smeadmin.conf /etc/e-smith/web/panels/manager/html/smeadmin/smeadmin.conf.old");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
13
root/etc/e-smith/events/actions/smeadmin-parselog
Executable file
13
root/etc/e-smith/events/actions/smeadmin-parselog
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
# Smeadmin - evenement appele par logrotate
|
||||||
|
# Copyright (C) 2006
|
||||||
|
# This file is distributed under the GPL license.
|
||||||
|
# Landry Breuil <landry@firewall-services.com>, 2006.
|
||||||
|
|
||||||
|
#------------------------------------------------------------
|
||||||
|
# On envoie le signal SIGUSR1 a smeadmind pour qu'il parse les logs
|
||||||
|
#------------------------------------------------------------
|
||||||
|
|
||||||
|
exec("/usr/bin/killall", "-USR1", "smeadmind");
|
||||||
|
# NOTREACHED
|
||||||
|
die("Failed to exec /usr/bin/killall -USR1 smeadmind");
|
@ -0,0 +1 @@
|
|||||||
|
PERMS=0750
|
160
root/etc/e-smith/templates/etc/e-smith/sql/init/smeadmin
Normal file
160
root/etc/e-smith/templates/etc/e-smith/sql/init/smeadmin
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# mysql
|
||||||
|
if [ -d /var/lib/mysql/sme9admin ] && [ ! -d /var/lib/mysql/smeadmin ]; then
|
||||||
|
echo "Migrating existing sme9admin MySQL database."
|
||||||
|
mysqladmin create smeadmin
|
||||||
|
mysqldump sme9admin | mysql smeadmin
|
||||||
|
PASS=$(/sbin/e-smith/db configuration getprop smeadmind DbPassword)
|
||||||
|
mysql -e " grant all privileges on smeadmin.* to 'smeadmin'@'localhost' identified by '$PASS'"
|
||||||
|
mysqladmin flush-privileges
|
||||||
|
elif [ -e /var/lib/mysql/smeadmin ]; then
|
||||||
|
# c'est une mise jour, on fait une upgrade de la base si besoin
|
||||||
|
sh /usr/share/doc/smeserver-smeadmin/update-mysql.sh
|
||||||
|
else
|
||||||
|
#si c'est une freshinstall on cree la bd mysql
|
||||||
|
sh /usr/share/doc/smeserver-smeadmin/create-mysql.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
# rrd
|
||||||
|
# migrating previous sme9admin rrd
|
||||||
|
if [ -d /var/lib/sme9admin ] && [ ! -d /var/lib/smeadmin ]; then
|
||||||
|
echo "Migrating existing sme9admin RRDs files."
|
||||||
|
cp -vr /var/lib/sme9admin /var/lib/smeadmin
|
||||||
|
fi
|
||||||
|
|
||||||
|
#ADD more DS for version 1.5-10
|
||||||
|
#first we test if these DS are already in the sensors.rrd
|
||||||
|
if [[ -f /var/lib/smeadmin/sensors.rrd ]]; then
|
||||||
|
rrdtool dump /var/lib/smeadmin/sensors.rrd > /tmp/new_file.xml
|
||||||
|
testDS=$(grep -w 'fspd2\|thd3\|thd4\|thd5\|thd6' /tmp/new_file.xml)
|
||||||
|
rm -f /tmp/new_file.xml
|
||||||
|
fi
|
||||||
|
# then since the DS are not in the sensors.rrd we create it
|
||||||
|
if [[ -d /var/lib/smeadmin ]] && [[ ! $testDS ]]; then
|
||||||
|
#if (fspd2,thd3,thd4,thd5,thd6) don't exist, then we create it without nuked the data already existent
|
||||||
|
/usr/share/doc/smeserver-smeadmin/add_ds_to_rrd.pl /var/lib/smeadmin sensors.rrd fspd2:GAUGE:600:0:10000
|
||||||
|
/usr/share/doc/smeserver-smeadmin/add_ds_to_rrd.pl /var/lib/smeadmin sensors.rrd thd3:GAUGE:600:0:100
|
||||||
|
/usr/share/doc/smeserver-smeadmin/add_ds_to_rrd.pl /var/lib/smeadmin sensors.rrd thd4:GAUGE:600:0:100
|
||||||
|
/usr/share/doc/smeserver-smeadmin/add_ds_to_rrd.pl /var/lib/smeadmin sensors.rrd thd5:GAUGE:600:0:100
|
||||||
|
/usr/share/doc/smeserver-smeadmin/add_ds_to_rrd.pl /var/lib/smeadmin sensors.rrd thd6:GAUGE:600:0:100
|
||||||
|
|
||||||
|
|
||||||
|
elif [[ ! -d /var/lib/smeadmin ]]; then
|
||||||
|
#si c'est une freshinstall on cree les rrd
|
||||||
|
sh /usr/share/doc/smeserver-smeadmin/create-rrd.sh
|
||||||
|
fi
|
||||||
|
if [[ ! -f /var/lib/smeadmin/qpsmtpd.rrd ]]; then
|
||||||
|
# si le rrd qpsmtpd existe pas (nouveauté SME9)
|
||||||
|
rrdtool create /var/lib/smeadmin/qpsmtpd.rrd -s 300 \
|
||||||
|
DS:check_basicheaders:GAUGE:600:0:U \
|
||||||
|
DS:check_goodrcptto:GAUGE:600:0:U \
|
||||||
|
DS:clamav:GAUGE:600:0:U \
|
||||||
|
DS:karma:GAUGE:600:0:U \
|
||||||
|
DS:tls_failed:GAUGE:600:0:U \
|
||||||
|
DS:rhsbl:GAUGE:600:0:U \
|
||||||
|
DS:check_earlytalker:GAUGE:600:0:U \
|
||||||
|
DS:resolvable_fromhost:GAUGE:600:0:U \
|
||||||
|
DS:dnsbl:GAUGE:600:0:U \
|
||||||
|
DS:fcrdns:GAUGE:600:0:U \
|
||||||
|
DS:spf:GAUGE:600:0:U \
|
||||||
|
DS:check_spamhelo:GAUGE:600:0:U \
|
||||||
|
DS:uribl:GAUGE:600:0:U \
|
||||||
|
DS:dmarc:GAUGE:600:0:U \
|
||||||
|
DS:auth_failed:GAUGE:600:0:U \
|
||||||
|
DS:total_denied:GAUGE:600:0:U \
|
||||||
|
DS:spam_denied:GAUGE:600:0:U \
|
||||||
|
DS:other_denied:GAUGE:600:0:U \
|
||||||
|
DS:spam_queued:GAUGE:600:0:U \
|
||||||
|
DS:queued:GAUGE:600:0:U \
|
||||||
|
DS:total:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365
|
||||||
|
|
||||||
|
else
|
||||||
|
/usr/bin/rrdinfo /var/lib/smeadmin/qpsmtpd.rrd|grep auth_failed > /dev/null
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
/usr/share/doc/smeserver-smeadmin/add_ds_to_rrd.pl /var/lib/smeadmin qpsmtpd.rrd auth_failed:GAUGE:600:0:U
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ ! -f /var/lib/smeadmin/qmail.rrd ]]; then
|
||||||
|
# nombre et raisons de connexions refusées ou acceptées et file d'attente
|
||||||
|
rrdtool create /var/lib/smeadmin/qmail.rrd -s 300 \
|
||||||
|
DS:local_failure:GAUGE:600:0:U \
|
||||||
|
DS:local_deferral:GAUGE:600:0:U \
|
||||||
|
DS:local_success:GAUGE:600:0:U \
|
||||||
|
DS:local_total:GAUGE:600:0:U \
|
||||||
|
DS:remote_failure:GAUGE:600:0:U \
|
||||||
|
DS:remote_deferral:GAUGE:600:0:U \
|
||||||
|
DS:remote_success:GAUGE:600:0:U \
|
||||||
|
DS:remote_total:GAUGE:600:0:U \
|
||||||
|
DS:local_queue:GAUGE:600:0:U \
|
||||||
|
DS:remote_queue:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365
|
||||||
|
fi
|
||||||
|
if [[ ! -f /var/lib/smeadmin/altqmail.rrd ]]; then
|
||||||
|
# nombre et raisons de connexions refusées ou acceptées et file d'attente
|
||||||
|
rrdtool create /var/lib/smeadmin/altqmail.rrd -s 300 \
|
||||||
|
DS:local_failure:GAUGE:600:0:U \
|
||||||
|
DS:local_deferral:GAUGE:600:0:U \
|
||||||
|
DS:local_success:GAUGE:600:0:U \
|
||||||
|
DS:local_total:GAUGE:600:0:U \
|
||||||
|
DS:remote_failure:GAUGE:600:0:U \
|
||||||
|
DS:remote_deferral:GAUGE:600:0:U \
|
||||||
|
DS:remote_success:GAUGE:600:0:U \
|
||||||
|
DS:remote_total:GAUGE:600:0:U \
|
||||||
|
DS:local_queue:GAUGE:600:0:U \
|
||||||
|
DS:remote_queue:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365
|
||||||
|
fi
|
||||||
|
|
2020
root/etc/e-smith/web/functions/smeadmin
Executable file
2020
root/etc/e-smith/web/functions/smeadmin
Executable file
File diff suppressed because it is too large
Load Diff
1702
root/usr/bin/smeadmind
Executable file
1702
root/usr/bin/smeadmind
Executable file
File diff suppressed because it is too large
Load Diff
21
root/usr/lib/systemd/system/smeadmind.service
Normal file
21
root/usr/lib/systemd/system/smeadmind.service
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=SME Admin Monitor Agent for Koozali SME Server
|
||||||
|
Before=shutdown.target
|
||||||
|
Conflicts=shutdown.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
Restart=no
|
||||||
|
TimeoutSec=1min
|
||||||
|
IgnoreSIGPIPE=no
|
||||||
|
KillMode=process
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
PIDFile=/var/run/smeadmin.pid
|
||||||
|
ExecStart=/usr/bin/smeadmind
|
||||||
|
ExecReload=/usr/bin/kill -HUP $MAINPID
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sme-server.target
|
86
root/usr/share/doc/smeserver-smeadmin/add_ds_to_rrd.pl
Normal file
86
root/usr/share/doc/smeserver-smeadmin/add_ds_to_rrd.pl
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
# Script to add a DS to an rrd
|
||||||
|
|
||||||
|
# How to us:
|
||||||
|
# 1. take a backup
|
||||||
|
# 2. add_ds_to_rrd.pl <rrd directory> <filename> <DS defintion>
|
||||||
|
|
||||||
|
# Example: how to add a DS to all the file vmstat.rrd in /home/users/hobbit/data/rrd
|
||||||
|
# add_ds_to_rrd.pl /home/users/hobbit/data/rrd vmstat.rrd cpu_pc:GAUGE:600:1:U
|
||||||
|
|
||||||
|
# Written bij Stef Coene (http://www.docum.org/foswiki/bin/view/Xymon/WebHome)
|
||||||
|
# Use at own risk
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
#my $rrdtool = '/usr/bin/rrdtool';
|
||||||
|
my $rrdtool = 'rrdtool';
|
||||||
|
|
||||||
|
my $rrddir = $ARGV[0] or die "no rrd dir" ;
|
||||||
|
my $file = $ARGV[1] or die "no file specification" ;
|
||||||
|
my $DStoadd = $ARGV[2] or die "no DS definition" ;
|
||||||
|
|
||||||
|
my ($dsname, $dstype, $dshb, $dsmin, $dsmax, $undef) = split(/:/, $DStoadd);
|
||||||
|
die "illegal source format\n" unless defined $dsmax and not defined $undef;
|
||||||
|
|
||||||
|
use File::Find ();
|
||||||
|
|
||||||
|
# Traverse desired filesystems
|
||||||
|
our @FILE ;
|
||||||
|
File::Find::find({wanted => \&wanted}, "$rrddir");
|
||||||
|
|
||||||
|
sub wanted {
|
||||||
|
if ( ( -f $File::Find::name ) and
|
||||||
|
( $File::Find::name =~ /\/$file\z/s ) ) {
|
||||||
|
our @FILE ; # Importeren van @FILE
|
||||||
|
push (@FILE, $File::Find::name) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $infile (@FILE) {
|
||||||
|
my $outfile = $infile . "." . $$ ;
|
||||||
|
print "$infile -> $outfile\n" ;
|
||||||
|
|
||||||
|
open(IN, "$rrdtool dump $infile|") or die "$!";
|
||||||
|
open(OUT, "|$rrdtool restore - $outfile") or die "$!";
|
||||||
|
|
||||||
|
while (<IN>) {
|
||||||
|
# Define new data source
|
||||||
|
m#<!-- Round Robin Archives --># and do {
|
||||||
|
print OUT <<".";
|
||||||
|
<ds>
|
||||||
|
<name> $dsname </name>
|
||||||
|
<type> $dstype </type>
|
||||||
|
<minimal_heartbeat> $dshb </minimal_heartbeat>
|
||||||
|
<min> $dsmin </min>
|
||||||
|
<max> $dsmax </max>
|
||||||
|
|
||||||
|
<!-- PDP Status -->
|
||||||
|
<last_ds> U </last_ds>
|
||||||
|
<value> 0.0000000000e+00 </value>
|
||||||
|
<unknown_sec> 0 </unknown_sec>
|
||||||
|
</ds>
|
||||||
|
|
||||||
|
.
|
||||||
|
};
|
||||||
|
|
||||||
|
# Add empty entry to the values
|
||||||
|
m#</cdp_prep># and do {
|
||||||
|
print OUT <<"."
|
||||||
|
<ds><primary_value> NaN </primary_value> <secondary_value> NaN </secondary_value> <value> NaN </value> <unknown_datapoints> 0 </unknown_datapoints></ds>
|
||||||
|
.
|
||||||
|
};
|
||||||
|
|
||||||
|
# Add empty entries to the database
|
||||||
|
s#</row>#<v> NaN </v></row>#;
|
||||||
|
|
||||||
|
print OUT $_;
|
||||||
|
}
|
||||||
|
|
||||||
|
close(IN) or die "$!";
|
||||||
|
close(OUT) or die "$!";
|
||||||
|
|
||||||
|
unlink $infile ;
|
||||||
|
rename $outfile, $infile ;
|
||||||
|
}
|
49
root/usr/share/doc/smeserver-smeadmin/create-mysql.sh
Executable file
49
root/usr/share/doc/smeserver-smeadmin/create-mysql.sh
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#-----------------------------------
|
||||||
|
#Script to create :
|
||||||
|
#-Database
|
||||||
|
#-mysql user
|
||||||
|
#-tables
|
||||||
|
#Executed after rpm installation
|
||||||
|
#-----------------------------------
|
||||||
|
|
||||||
|
#database creation
|
||||||
|
mysqladmin create smeadmin 2>err
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo -n "Error in the creation of the database : "
|
||||||
|
cat err
|
||||||
|
else
|
||||||
|
echo -e "Database creation :\t\t\t[OK]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
PASS=$(/sbin/e-smith/db configuration getprop smeadmind DbPassword)
|
||||||
|
|
||||||
|
#user creation
|
||||||
|
mysql -e " grant all privileges on smeadmin.* \
|
||||||
|
to 'smeadmin'@'localhost' \
|
||||||
|
identified by '$PASS' " 2>err
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo -n "Error in the creation of mysql user : "
|
||||||
|
cat err
|
||||||
|
else
|
||||||
|
echo -e "Creation of mysql user :\t\t[OK]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#table creation
|
||||||
|
mysql smeadmin < /usr/share/doc/smeserver-smeadmin/tables.sql 2>err
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo -n "Error in the creation of the tables : "
|
||||||
|
cat err
|
||||||
|
else
|
||||||
|
echo -e "Creation of tables :\t\t\t[OK]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f err
|
||||||
|
|
||||||
|
#validation des modifications
|
||||||
|
mysqladmin flush-privileges
|
542
root/usr/share/doc/smeserver-smeadmin/create-rrd.sh
Executable file
542
root/usr/share/doc/smeserver-smeadmin/create-rrd.sh
Executable file
@ -0,0 +1,542 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#script for the creation of rrds
|
||||||
|
#creation of the directory for the rrd files
|
||||||
|
if [ -d /var/lib/smeadmin ]
|
||||||
|
then
|
||||||
|
mv /var/lib/smeadmin /var/lib/smeadmin.old
|
||||||
|
echo -e "Backup of the existing rrds directory :\t[OK]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p /var/lib/smeadmin/
|
||||||
|
echo -e "Creation of the rrds directory :\t[OK]"
|
||||||
|
|
||||||
|
#creation of the rrds
|
||||||
|
#we have a pdp each 300s=5mn
|
||||||
|
#time for computing a cdp + number of pdp by cdp:nb cdp
|
||||||
|
#- On 1h, avg on 5mn + 1:12
|
||||||
|
#- On 6h, avg on 5mn + 1:72
|
||||||
|
#- On 1j, avg on 5mn + 1:288
|
||||||
|
#- On 1s, avg on 30mn + 6:336
|
||||||
|
#- On 1m, avg on 2h + 24:372
|
||||||
|
#- On 1a, avg on 1j + 288:365
|
||||||
|
|
||||||
|
#sensors.rrd : informations concernant le materiel
|
||||||
|
|
||||||
|
# t1 : temperature du processeur en degres centigrades
|
||||||
|
# thd1 : temperature du disque dur principal
|
||||||
|
# thd2 : temperature du disque dur 2 si disponible
|
||||||
|
# t2 : temperature du boitier/carte mere
|
||||||
|
# fspd : vitesse du ventilateur processeur
|
||||||
|
# fspd2 : vitesse du ventilateur processeur
|
||||||
|
# thd3 : temperature du disque dur 3 si disponible
|
||||||
|
# thd4 : temperature du disque dur 4 si disponible
|
||||||
|
# thd5 : temperature du disque dur 5 si disponible
|
||||||
|
# thd6 : temperature du disque dur 6 si disponible
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/sensors.rrd -s 300 \
|
||||||
|
DS:t1:GAUGE:600:0:100 \
|
||||||
|
DS:t2:GAUGE:600:0:100 \
|
||||||
|
DS:thd1:GAUGE:600:0:100 \
|
||||||
|
DS:thd2:GAUGE:600:0:100 \
|
||||||
|
DS:fspd:GAUGE:600:0:10000 \
|
||||||
|
DS:fspd2:GAUGE:600:0:10000 \
|
||||||
|
DS:thd3:GAUGE:600:0:100 \
|
||||||
|
DS:thd4:GAUGE:600:0:100 \
|
||||||
|
DS:thd5:GAUGE:600:0:100 \
|
||||||
|
DS:thd6:GAUGE:600:0:100 \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
#hd.rrd : informations sur l'occupation du disque dur
|
||||||
|
|
||||||
|
# total : taille totale du disque en ko
|
||||||
|
# used : place utilisee
|
||||||
|
# free : place libre
|
||||||
|
# log : place prise par /var/log/
|
||||||
|
# files : place prise par /home/e-smith/files/
|
||||||
|
# squid : place prise par /var/spool/squid/
|
||||||
|
# mysql : place prise par /var/lib/mysql/
|
||||||
|
# blckread : nb de blocks lus par secondes
|
||||||
|
# blckwrite : nb de blocks ecrits par secondes
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/hd.rrd -s 300 \
|
||||||
|
DS:total:GAUGE:600:0:U \
|
||||||
|
DS:used:GAUGE:600:0:U \
|
||||||
|
DS:free:GAUGE:600:0:U \
|
||||||
|
DS:log:GAUGE:600:0:U \
|
||||||
|
DS:files:GAUGE:600:0:U \
|
||||||
|
DS:squid:GAUGE:600:0:U \
|
||||||
|
DS:mysql:GAUGE:600:0:U \
|
||||||
|
DS:blckread:GAUGE:600:0:U \
|
||||||
|
DS:blckwrite:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
#if_loc.rrd : trafic sur l'interface reseau locale
|
||||||
|
|
||||||
|
# bin : nombre d'octets en entree
|
||||||
|
# bout : nombre d'octets en sortie
|
||||||
|
# pin : nombre de packets en entree
|
||||||
|
# pout : nombre de packets en sortie
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/if_loc.rrd -s 300 \
|
||||||
|
DS:bin:GAUGE:600:0:U \
|
||||||
|
DS:bout:GAUGE:600:0:U \
|
||||||
|
DS:pin:GAUGE:600:0:U \
|
||||||
|
DS:pout:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
#if_ext.rrd : trafic sur l'interface reseau externe
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/if_ext.rrd -s 300 \
|
||||||
|
DS:bin:GAUGE:600:0:U \
|
||||||
|
DS:bout:GAUGE:600:0:U \
|
||||||
|
DS:pin:GAUGE:600:0:U \
|
||||||
|
DS:pout:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
#net.rrd : informations sur le reseau
|
||||||
|
|
||||||
|
# samba : nombre de connexions samba actives
|
||||||
|
# dhcp : nombre de baux dhcp actifs
|
||||||
|
# mail_in : nombre de mails entrants
|
||||||
|
# mail_out : nombre de mails sortants
|
||||||
|
# spam : nombre de mails filtres par l'antispam
|
||||||
|
# virus : nombre de mails filtres par l'antivirus
|
||||||
|
# minlatency : ping minimum
|
||||||
|
# avglatency : ping moyen
|
||||||
|
# maxlatency : ping maximum
|
||||||
|
# loss : % de packets perdus sur un ping
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/net.rrd -s 300 \
|
||||||
|
DS:samba:GAUGE:600:0:U \
|
||||||
|
DS:dhcp:GAUGE:600:0:U \
|
||||||
|
DS:mail_in:GAUGE:600:0:U \
|
||||||
|
DS:mail_out:GAUGE:600:0:U \
|
||||||
|
DS:spam:GAUGE:600:0:U \
|
||||||
|
DS:virus:GAUGE:600:0:U \
|
||||||
|
DS:minlatency:GAUGE:600:0:U \
|
||||||
|
DS:avglatency:GAUGE:600:0:U \
|
||||||
|
DS:maxlatency:GAUGE:600:0:U \
|
||||||
|
DS:loss:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
#cpu.rrd : utilisation des ressources processeur
|
||||||
|
|
||||||
|
# total : 1-idle
|
||||||
|
# idle : temps "libre" du processeur
|
||||||
|
# system : % occupe par les processus systemes
|
||||||
|
# user : % occupe par les processus utilisateurs
|
||||||
|
# nice : % occupe par les processus utilisateurs avec priorite nice
|
||||||
|
# plist : nombre de processus total
|
||||||
|
# runq : nombre de processus en attente
|
||||||
|
# load1 : charge du processeur dans la derniere minute
|
||||||
|
# load5 : charge du processeur dans les 5 dernieres minutes
|
||||||
|
# load15 : charge du processeur dans les 15 dernieres minutes
|
||||||
|
# uptime : temps depuis le dernier reboot
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/cpu.rrd -s 300 \
|
||||||
|
DS:total:GAUGE:600:0:U \
|
||||||
|
DS:idle:GAUGE:600:0:U \
|
||||||
|
DS:system:GAUGE:600:0:U \
|
||||||
|
DS:user:GAUGE:600:0:U \
|
||||||
|
DS:nice:GAUGE:600:0:U \
|
||||||
|
DS:plist:GAUGE:600:0:U \
|
||||||
|
DS:runq:GAUGE:600:0:U \
|
||||||
|
DS:load1:GAUGE:600:0:U \
|
||||||
|
DS:load5:GAUGE:600:0:U \
|
||||||
|
DS:load15:GAUGE:600:0:U \
|
||||||
|
DS:uptime:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
#mem.rrd : occupation de la memoire vive
|
||||||
|
|
||||||
|
# memtotal : memoire totale physique
|
||||||
|
# memused : memoire utilisee - (cachee + buffers)
|
||||||
|
# memfree : memoire libre + (cachee + buffers)
|
||||||
|
# memactualused : memoire utilisee
|
||||||
|
# memactualfree : memoire libre
|
||||||
|
# membuffers : buffers memoire du noyau
|
||||||
|
# memcached : memoire cachee pour les donnees
|
||||||
|
# swaptotal : memoire totale virtuelle
|
||||||
|
# swapused : occupation du swap
|
||||||
|
# swapfree : partie libre du swap
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/mem.rrd -s 300 \
|
||||||
|
DS:memtotal:GAUGE:600:0:U \
|
||||||
|
DS:memused:GAUGE:600:0:U \
|
||||||
|
DS:memfree:GAUGE:600:0:U \
|
||||||
|
DS:memactualused:GAUGE:600:0:U \
|
||||||
|
DS:memactualfree:GAUGE:600:0:U \
|
||||||
|
DS:membuffers:GAUGE:600:0:U \
|
||||||
|
DS:memcached:GAUGE:600:0:U \
|
||||||
|
DS:swaptotal:GAUGE:600:0:U \
|
||||||
|
DS:swapused:GAUGE:600:0:U \
|
||||||
|
DS:swapfree:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
# httpd.rrd : stats serveur apache
|
||||||
|
|
||||||
|
# cpu : occupation cpu de httpd
|
||||||
|
# mem : occupation memoire
|
||||||
|
# nbproc : nombre de processus
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/httpd.rrd -s 300 \
|
||||||
|
DS:cpu:GAUGE:600:0:U \
|
||||||
|
DS:mem:GAUGE:600:0:U \
|
||||||
|
DS:nbproc:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
|
||||||
|
# samba.rrd : stats serveur samba
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/samba.rrd -s 300 \
|
||||||
|
DS:cpu:GAUGE:600:0:U \
|
||||||
|
DS:mem:GAUGE:600:0:U \
|
||||||
|
DS:nbproc:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
|
||||||
|
# afpd.rrd : stats serveur apple file protocol
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/afp.rrd -s 300 \
|
||||||
|
DS:cpu:GAUGE:600:0:U \
|
||||||
|
DS:mem:GAUGE:600:0:U \
|
||||||
|
DS:nbproc:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
|
||||||
|
# squid.rrd : stats proxy squid
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/squid.rrd -s 300 \
|
||||||
|
DS:cpu:GAUGE:600:0:U \
|
||||||
|
DS:mem:GAUGE:600:0:U \
|
||||||
|
DS:nbproc:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
# sessions.rrd : stats sessions
|
||||||
|
|
||||||
|
# nombre de sessions a un instant par service
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/sessions.rrd -s 300 \
|
||||||
|
DS:ssh:GAUGE:600:0:U \
|
||||||
|
DS:ftp:GAUGE:600:0:U \
|
||||||
|
DS:vpn:GAUGE:600:0:U \
|
||||||
|
DS:netbios:GAUGE:600:0:U \
|
||||||
|
DS:afp:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
# qpsmtpd.rrd : stats connexions email entrant
|
||||||
|
|
||||||
|
# nombre et raisons de connexions refusées ou accéptées
|
||||||
|
|
||||||
|
rrdtool create /var/lib/smeadmin/qpsmtpd.rrd -s 300 \
|
||||||
|
DS:check_basicheaders:GAUGE:600:0:U \
|
||||||
|
DS:check_goodrcptto:GAUGE:600:0:U \
|
||||||
|
DS:clamav:GAUGE:600:0:U \
|
||||||
|
DS:karma:GAUGE:600:0:U \
|
||||||
|
DS:tls_failed:GAUGE:600:0:U \
|
||||||
|
DS:rhsbl:GAUGE:600:0:U \
|
||||||
|
DS:check_earlytalker:GAUGE:600:0:U \
|
||||||
|
DS:resolvable_fromhost:GAUGE:600:0:U \
|
||||||
|
DS:dnsbl:GAUGE:600:0:U \
|
||||||
|
DS:fcrdns:GAUGE:600:0:U \
|
||||||
|
DS:spf:GAUGE:600:0:U \
|
||||||
|
DS:check_spamhelo:GAUGE:600:0:U \
|
||||||
|
DS:uribl:GAUGE:600:0:U \
|
||||||
|
DS:dmarc:GAUGE:600:0:U \
|
||||||
|
DS:auth_failed:GAUGE:600:0:U \
|
||||||
|
DS:total_denied::GAUGE:600:0:U \
|
||||||
|
DS:spam_denied::GAUGE:600:0:U \
|
||||||
|
DS:other_denied::GAUGE:600:0:U \
|
||||||
|
DS:spam_queued::GAUGE:600:0:U \
|
||||||
|
DS:queued::GAUGE:600:0:U \
|
||||||
|
DS:total::GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
# qmail.rrd : stats connexions email sortant local et distant
|
||||||
|
|
||||||
|
# nombre et raisons de connexions refusées ou acceptées et file d'attente
|
||||||
|
rrdtool create /var/lib/smeadmin/qmail.rrd -s 300 \
|
||||||
|
DS:local_failure:GAUGE:600:0:U \
|
||||||
|
DS:local_deferral:GAUGE:600:0:U \
|
||||||
|
DS:local_success:GAUGE:600:0:U \
|
||||||
|
DS:local_total:GAUGE:600:0:U \
|
||||||
|
DS:remote_failure:GAUGE:600:0:U \
|
||||||
|
DS:remote_deferral:GAUGE:600:0:U \
|
||||||
|
DS:remote_success:GAUGE:600:0:U \
|
||||||
|
DS:remote_total:GAUGE:600:0:U \
|
||||||
|
DS:local_queue:GAUGE:600:0:U \
|
||||||
|
DS:remote_queue:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
# nombre et raisons de connexions refusées ou acceptées et file d'attente
|
||||||
|
rrdtool create /var/lib/smeadmin/altqmail.rrd -s 300 \
|
||||||
|
DS:local_failure:GAUGE:600:0:U \
|
||||||
|
DS:local_deferral:GAUGE:600:0:U \
|
||||||
|
DS:local_success:GAUGE:600:0:U \
|
||||||
|
DS:local_total:GAUGE:600:0:U \
|
||||||
|
DS:remote_failure:GAUGE:600:0:U \
|
||||||
|
DS:remote_deferral:GAUGE:600:0:U \
|
||||||
|
DS:remote_success:GAUGE:600:0:U \
|
||||||
|
DS:remote_total:GAUGE:600:0:U \
|
||||||
|
DS:local_queue:GAUGE:600:0:U \
|
||||||
|
DS:remote_queue:GAUGE:600:0:U \
|
||||||
|
RRA:AVERAGE:0.5:1:12 \
|
||||||
|
RRA:AVERAGE:0.5:1:72 \
|
||||||
|
RRA:AVERAGE:0.5:1:288 \
|
||||||
|
RRA:AVERAGE:0.5:6:336 \
|
||||||
|
RRA:AVERAGE:0.5:24:372 \
|
||||||
|
RRA:AVERAGE:0.5:288:365 \
|
||||||
|
RRA:MAX:0.5:1:12 \
|
||||||
|
RRA:MAX:0.5:1:72 \
|
||||||
|
RRA:MAX:0.5:1:288 \
|
||||||
|
RRA:MAX:0.5:6:336 \
|
||||||
|
RRA:MAX:0.5:24:372 \
|
||||||
|
RRA:MAX:0.5:288:365 \
|
||||||
|
RRA:MIN:0.5:1:12 \
|
||||||
|
RRA:MIN:0.5:1:72 \
|
||||||
|
RRA:MIN:0.5:1:288 \
|
||||||
|
RRA:MIN:0.5:6:336 \
|
||||||
|
RRA:MIN:0.5:24:372 \
|
||||||
|
RRA:MIN:0.5:288:365 \
|
||||||
|
|
||||||
|
|
||||||
|
echo -e "Creation of rrds files :\t\t[OK]"
|
240
root/usr/share/doc/smeserver-smeadmin/smeadmin-doc-en.html
Normal file
240
root/usr/share/doc/smeserver-smeadmin/smeadmin-doc-en.html
Normal file
@ -0,0 +1,240 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="us" xml:lang="us">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/server-common/css/sme_core.css" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||||
|
|
||||||
|
<title> Documentation Smeadmin </title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h3> Documentation Smeadmin </h3>
|
||||||
|
<p>
|
||||||
|
<b> Author :</b> Landry Breuil <br />
|
||||||
|
<b> Creation date of this doc :</b> 30/01/2006 <br />
|
||||||
|
<b> Corresponding version of Smeadmin :</b> 1.1.0-1 <br />
|
||||||
|
<b> Sme6admin was tested with SME :</b> 7b5, 7pre1<br />
|
||||||
|
|
||||||
|
<p><i> Why this contrib ? </i>:
|
||||||
|
<br />The aim is to see globally what happens on the server, without using the administrative ssh shell. The homepage of the contrib is in the SME server-manager, in the tab <code>Smeadmin</code>. This contrib is an evolution of sme6admin for SME7, and has been mostly rewritten.
|
||||||
|
</p>
|
||||||
|
<p><i> Description of the different pages </i>:
|
||||||
|
<ul>
|
||||||
|
<li />List of the informations provided by the main page of the contrib :
|
||||||
|
<ul>
|
||||||
|
<li />Some links to the pages containings the graphs (see below), and a link to the configuration page of Smeadmin.
|
||||||
|
<li />The result of the command <code>netstat</code> which permits to see the opened tcp connexions on the server. The outgoing/incoming connexions are highlighted.
|
||||||
|
<li />The result of the command <code>w</code> which permits to see the list of the users connected to a shell on the server, from where, since when, and what was their last command.
|
||||||
|
<li />The status of the main services running on the server, with the associated number of unix processes. The right button allows to stop/start a service. (it corresponds to the command <code> service xxx stop/start </code>)
|
||||||
|
<br /> Some of the services' name are links to pages containing more details on the chosen service.
|
||||||
|
<li />The result of the command <code>netstat --listen -tp</code> showing the list of processes listening on a socket.
|
||||||
|
<li />The date of the last antivirus database update, and the number of viruses/signatures known by ClamAV.
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<li />Graph page on the harware state contains :
|
||||||
|
<ul>
|
||||||
|
<li />A graph with the temperatures of the cpu and motherboard, detected by lm_sensors, and those of the hard disks, detected by hddtemp.
|
||||||
|
<li />A graph with the cpu fan speed.
|
||||||
|
<br />(You must notice that these values depends entirely of the support of your hardware by lm_sensors and hddtemp. You have to CONFIGURE correctly Smeadmin first if you want the graphs to fill.)
|
||||||
|
<br />You can have these graphs on various durations, following the links on top of the page.
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<li />Graph page on the network use contains :
|
||||||
|
<ul>
|
||||||
|
<li />A graph on the opened network sessions. It monitors the ftp, ssh, netbios, afp and vpn connexions. Theses curves corresponds to the number of opened tcp connexions on the ports 21,22,139,548 and 1723.
|
||||||
|
<li />A graph with the number of dhcp leases renewal and samba connexions. It permits to view the local network activity. The samba connexions differs from the netbios connexions here because a client host can be connected simultaneously to many samba shares, this makes only one netbios connexion and many samba "connexions".
|
||||||
|
<li />A graph with the amount of incoming/outgoing e-mails on the server (the values are stacked). By default, it only counts the e-mails accounts of the server's main domain, the virtual domains, and the e-mails fetched by fetchmail on local mailboxes. You can add domains and e-mail adresses by configuring Smeadmin, but only the mails passing through SME's e-mail server will be counted. There is also the number of rejected spam by Spamassassin and the number of viruses filtered by ClamAV.
|
||||||
|
<li />A graph showing the ping latency with the default gateway to internet. The ping target is configurable, as it may be useful if you are not directly on the web (ie. in <code>server-only</code> mode) to test the latency on an external host. If the ping is greater than 200ms, the value is bounded to have a readable graph. (If you had a 4s ping latency, you would have had a peak on the graph and nothing around.)
|
||||||
|
<li />Two graphs with the amount of raw network flow on the server. Frequently, the amount of data incoming on the external network interface corresponds to the outgoing data on the internal network interface, it is flow relayed by the server to the local network. On the third graph you can see the amount of data which is not a relayed flow. If the server is in <code>server-only</code> mode, only one graph is displayed, as you have only one NIC.
|
||||||
|
</ul>
|
||||||
|
<br />
|
||||||
|
<li />Graph page on the system use contains :
|
||||||
|
<ul>
|
||||||
|
<li />A graph on the % cpu use, with the ratio between system, user and niced processes.
|
||||||
|
<li />A graph on the system load, in comparison to the total % cpu use.
|
||||||
|
<li />A graph on the number of processes running on the server, with the size of the run queue.
|
||||||
|
<li />A graph with the server uptime.
|
||||||
|
<li />A graph on the server RAM use.
|
||||||
|
<li />A graph on the server swap use.
|
||||||
|
<li />A graph with the amount of raw data written/read on the hard disk.
|
||||||
|
<li />A graph on the disk space use, detailed with the size of special directories of SME Server : <code>/var/log</code> (log files), <code>/home/e-smith/files</code> (user files and ibays), <code>/var/spool/squid</code> (Squid cache), <code>/var/lib/mysql</code> (MySQL databases), and finally the available free space on the hard disk. You can desactivate the computing of directories'size, because on large hard disks, it may take a LOT of time. If so, you would have only available disk space displayed on the graph.
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<li />Advanced tests page :
|
||||||
|
<br />This page is used when you want to check if a service responds really when you send a request.
|
||||||
|
<br />If you click on the links, you can check the httpd, smbd, nmbd, popd, sshd, ftpd, smtpfront-qmail services, and the ping to the outside (google.fr here).
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<li />Configuration page of Smeadmin :
|
||||||
|
<br />This last page permits to configure the <code>smeadmind</code> daemon, and to set some web interface settings. The configuration is saved in a plain-text file. The settings are :
|
||||||
|
<ul>
|
||||||
|
<li /> Recipient and frequency of status e-mails. If you put 0 for the frequency, status e-mails are disabled.
|
||||||
|
<br /><li /> MySQL connection settings. You may change these values only if you have modified corresponding MySQL settings first.
|
||||||
|
<br /><li /> Network interface names. Normally, these settings are autodetected, though you may have to change them. (You may have a third wireless NIC, and you want to monitor it in place of another NIC...). You can add external mail domains to count, but they will be matched only if the mails pass through SME's internal mail system.
|
||||||
|
<br /><li /> Miscellaneous web interface settings. (graphs size & format,...)
|
||||||
|
<br /><li /> Hardware sensors settings. Remember first to check if your hardware is supported by lm_sensors and hddtemp, and then check if these settings are correct before bugging me with "My temp graphs are empty ? WTF ? Your program sucks !"
|
||||||
|
<br /><li /> Recipient of alert e-mails. and bounds for the alerts. If you put 0, the alert is disabled. The possible bounds are : the hardware temperatures, the number of ssh/ftp/vpn/netbios connexions, the disk space, cpu and memory use, and the number of incoming/outgoing e-mails.
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<li />Details page on httpd / httpd-admin service :
|
||||||
|
<br />It is a graph with the number, % cpu use, and size of memory allocated for the httpd processes.
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<li />Details page on sshd service :
|
||||||
|
<br />You have the list of the last administrative connexions. Successful root connexions are highlighted, and all failed connexions attempts are shown.
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<li />Details page on squid service :
|
||||||
|
<br />It is a graph with the number, % cpu use, and size of memory allocated for the squid processes.
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<li />Details page on pppoe service :
|
||||||
|
<br />It shows the history of the ADSL connexions, with the start, end, duration, ip assigned and amount of data transferred. Connexions which lasted less than 4 hours, and disconnexions that lasted more than one minute are highlighted. These two parameters can be changed in the configuration page of Smeadmin. Thus, you can see the reliability/stability of the internet link.
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<li />Details page on dhcpd service :
|
||||||
|
<br />You have the date of the lasts dhcp leases renewal by local network hosts, theirs MAC/IP address, and theirs hostname (assigned by the server). Thus you can see which workstation was recently powered on, and since when a workstation has not been seen on the local network.
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<li />Details page on pptpd service :
|
||||||
|
<br />It presents the list of the vpn connexions on the server, with the start, end, duration, client IP/login, and amount of data transferred. Connexions which lasted more than 2 hours are highlighted.This parameter can be changed in the configuration page of Smeadmin.
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<li />Details page on smb/nmb service :
|
||||||
|
<br />First, you have the history of the last connexions from a triplet (host/ip/user) to a samba share on the server, and the approximative duration (to 5 minutes).
|
||||||
|
<br />Then there is the graph showing the number, % cpu use and size of memory allocated to the samba processes.
|
||||||
|
<br />Thus you can analyse which hosts use frequently the samba service.
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<li />Details page on atalk service :
|
||||||
|
<br />In the same way, this page shows first the history of the last connexions to the Apple file share system on the system, with the amount of data transferred.
|
||||||
|
<br />Then it shows the graph with the number, % cpu use and size of memory allocated to the afp system processes (papd, afpd, netatalk).
|
||||||
|
<br />Thus you can view which hosts use the atalk share system.
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<li />Details page on proftpd service :
|
||||||
|
<br />This page shows the list of the connexions to the ftp service, successful or not. You have the IP of the client, its login and the amount of data transferred.
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p><i> List of files installed/created by the RPM </i>:
|
||||||
|
|
||||||
|
<code>
|
||||||
|
<br />/etc/e-smith/events/actions/smeadmin-parselog
|
||||||
|
<br />/etc/e-smith/events/logrotate/S15smeadmin-parselog
|
||||||
|
<br />/etc/e-smith/web/functions/smeadmin
|
||||||
|
<br />/etc/e-smith/web/panels/manager/cgi-bin/smeadmin
|
||||||
|
<br />/etc/e-smith/web/panels/manager/html/smeadmin/smeadmin.conf
|
||||||
|
<br />/etc/rc.d/init.d/smeadmind
|
||||||
|
<br />/etc/rc.d/rc0.d/K03smeadmind
|
||||||
|
<br />/etc/rc.d/rc1.d/K03smeadmind
|
||||||
|
<br />/etc/rc.d/rc2.d/K03smeadmind
|
||||||
|
<br />/etc/rc.d/rc3.d/S97smeadmind
|
||||||
|
<br />/etc/rc.d/rc4.d/S97smeadmind
|
||||||
|
<br />/etc/rc.d/rc5.d/S97smeadmind
|
||||||
|
<br />/etc/rc.d/rc6.d/K03smeadmind
|
||||||
|
<br />/etc/rc.d/rc7.d/S97smeadmind
|
||||||
|
<br />/usr/bin/smeadmind
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/create_mysql.sh
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/create_rrd.sh
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/create_smedb.sh
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/smeadmin-doc-fr.html
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/smeadmin-doc-en.html
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/smeadmin-fr.po
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/smeadmin-en.po
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/tables.sql
|
||||||
|
<br />/usr/share/locale/en/LC_MESSAGES/smeadmin.mo
|
||||||
|
<br />/usr/share/locale/fr/LC_MESSAGES/smeadmin.mo
|
||||||
|
</code>
|
||||||
|
|
||||||
|
<br />List of the directories used :
|
||||||
|
<table border=1>
|
||||||
|
<tr><th>File/directory</th><th>Contains</th></tr>
|
||||||
|
<tr><td><code>/var/log/smeadmin.log</code></td><td>daemon's trace and errors</td></tr>
|
||||||
|
<tr><td><code>/var/tmp/</code></td><td>temporary logs'place.</td></tr>
|
||||||
|
<tr><td><code>/var/lib/smeadmin/</code></td><td>RRDs files handling datas for the graphs.</td></tr>
|
||||||
|
<tr><td><code>/etc/e-smith/web/panels/manager/html/smeadmin/</code></td><td>generated graphs and configuration file.</td></tr>
|
||||||
|
</table>
|
||||||
|
<br />(The daemons puts all the graphs in a subdirectory of the <code>server-manager</code>, thus the panel is attainable through a SSH tunnel.)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p><i> A little more details </i>:
|
||||||
|
<ul>
|
||||||
|
<li />The status and alert e-mails are sent with <b>smeadmin-daemon@mydomain</b> as sender, you can use it as a filter in your mail-reader.
|
||||||
|
<li />An alert e-mail reminds the fixed bound, the current value, and a short explanation for the alert. You have a direct link to the bound configuration webpage.
|
||||||
|
<li />A status e-mail sends the number of opened connexions to the services, the 10 last lines of <code>/var/log/messages</code>, the output of <code>netstat --numeric-hosts -tup</code> (detailed list of all opened and active network connections), and the status of samba, httpd and sshd services. If you don't receive it, there is probably a problem on the server (Server off, qmail stopped, pppoe down,...)
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
The program runs as a daemon, to know if it runs :
|
||||||
|
<br /><code>service smeadmind status</code>
|
||||||
|
<br />If it is off, you can have a idea of its problem in the log file <code>/var/log/smeadmin.log</code>. If you encounter problems restarting it, execute <code>rm -f /var/run/smeadmin.pid</code> before retrying.
|
||||||
|
<br />It is run at the boot of the server. On the <code>logrotate</code> event, the system sends a SIGUSR1 unix signal to force the daemon to parse the logs which will be archived.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p><i> Changelog </i>:
|
||||||
|
<br /><br />* Web Feb 01 2006 : v1.1.0 - one year after last major release.
|
||||||
|
<br />- Renamed to smeserver-smeadmin.
|
||||||
|
<br />- Only compatible with SME 7 from now. (Only if a get a LOT of requests, i'll port the new functions to sme6admin.)
|
||||||
|
<br />- Major global rewrite, a LOT of code cleaning.
|
||||||
|
<br />- The settings are now in a configuration file.
|
||||||
|
<br />- A LOT of things are now configurable (more setups are supported).
|
||||||
|
<br />- Added SME7-specific services.
|
||||||
|
<br />- Added a link to configure the bound in an alert e-mail.
|
||||||
|
<br />- Added the output of 'netstat -tlp' and 'w' to the main page.
|
||||||
|
|
||||||
|
<br /><br />* Mon Oct 03 2005 : v1.0.5 by Cyril
|
||||||
|
<br />- Correction of some bugs to run the daemon on sme7.
|
||||||
|
<br />- A lot of things are buggy(events not correctly detected) on sme7.
|
||||||
|
|
||||||
|
<br /><br />* Tue Feb 01 2005 : v1.0.4
|
||||||
|
<br />- Change to gettext for all the text outputs.
|
||||||
|
<br />- English translation for the panel and the text of e-mails.
|
||||||
|
<br />- File .po included for french and english language.
|
||||||
|
|
||||||
|
<br /><br />* Tue Sep 14 2004 : v1.0.3
|
||||||
|
<br />- Added afp on the session graph.
|
||||||
|
<br />- Modified the network traffic graphs.
|
||||||
|
<br />- Modified the raw data write/read graph.
|
||||||
|
<br />- Added network traffic (all but relayed) graph.
|
||||||
|
<br />- Improvement of UI and short_status (easter-egg ;)).
|
||||||
|
<br />- Corrected ftp anonymous client bug.
|
||||||
|
<br />- Possibility to disable alerts.
|
||||||
|
<br />- Clean /var/tmp on logrotate.
|
||||||
|
|
||||||
|
<br /><br />* Thu Aug 26 2004 : v1.0.2
|
||||||
|
<br />- Compatibility with 5.6 Ok.
|
||||||
|
<br />- Take care of US locale (0.0 => 0,0).
|
||||||
|
<br />- Added temperature for second hard disk.
|
||||||
|
<br />- Corrected bugs.
|
||||||
|
<br />- Improvement of the postinstall and preuninstall scripts to enable rpm upgrade.
|
||||||
|
|
||||||
|
<br /><br />* Mon Aug 9 2004 : v1.0.1
|
||||||
|
<br />- Added the configuration of delay between 2 status e-mails.
|
||||||
|
<br />- Improvement of the compatibility with SME 5.6.
|
||||||
|
|
||||||
|
<br /><br />* Fri Aug 6 2004 : v1.0.0
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
All complaint, bug reports, requests, remarks, thanks are welcome at <code>landry at firewall - services dot com</code>, especially if the english translation of the doc/UI/howto is BAD. I NEED a feedback from the users to improve smeadmin. A big thanks goes to rv, who supported me during the creation of smeadmin, and Shad Lords for his sysmon, i've used some of his ideas.
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
214
root/usr/share/doc/smeserver-smeadmin/smeadmin-doc-fr.html
Normal file
214
root/usr/share/doc/smeserver-smeadmin/smeadmin-doc-fr.html
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/server-common/css/sme_core.css" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||||
|
|
||||||
|
<title> Documentation Smeadmin </title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h3> Documentation Smeadmin </h3>
|
||||||
|
<p>
|
||||||
|
<b> Auteur :</b> Landry Breuil <br />
|
||||||
|
<b> Date de création de cette doc :</b> 29/01/2006 <br />
|
||||||
|
<b> Version de Smeadmin correspondante :</b> 1.1.0-1 <br />
|
||||||
|
<b> Versions de SME testées avec Smeadmin :</b> 7b5, 7pre1 <br />
|
||||||
|
|
||||||
|
<p><i> Pourquoi cette contrib ? </i>:
|
||||||
|
<br />Pouvoir voir en un coup d'oeil ce qu'il se passe sur le serveur sans avoir à utiliser la console d'administration par ssh. L'accueil de la contrib est accessible dans le server-manager d'SME à l'onglet <code>Smeadmin</code>. Cette contrib est l'évolution de sme6admin pour SME7, et à été réécrite presque totalement.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p><i> Description des différentes pages </i>:
|
||||||
|
<ul>
|
||||||
|
<li />Liste des informations fournies par la page d'accueil de la contrib :
|
||||||
|
<ul>
|
||||||
|
<li />Des liens vers les pages comportants les graphes d'activité du système expliqués juste après, ainsi qu'un lien vers la page permettant de configurer smeadmin.
|
||||||
|
<li />Le résultat de la commande <code>netstat</code> qui permet de voir quelles sont les connexions tcp ouvertes sur le serveur. On distingue les connexions vers l'exterieur/interieur.
|
||||||
|
<li />Le résultat de la commande <code>w</code> qui permet de voir les utilisateurs connectés directement sur le serveur, depuis quand, à partir d'où et quelle était la dernière commande lancée.
|
||||||
|
<li />Le status des principaux services tournant sur le système, avec le nombre de processus unix associés. Le bouton à droite permet d'arrêter/démarrer un service. (Ce qui correspond à la commande <code> service xx stop/start</code>)
|
||||||
|
<br />Certains des noms des services sont des liens vers des pages comportants plus de détails sur le service en question.
|
||||||
|
<li />Le résultat de la commande <code>netstat --listen -tp</code> qui permet de voir la liste des processus en attente de connexion.
|
||||||
|
<li />On à ensuite la date de la dernière mise à jour de la base de virus de ClamAV, ainsi que le nombre de virus contre lesquels on est protégés.
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<br /><li />Page de graphes sur l'état du matériel :
|
||||||
|
<ul>
|
||||||
|
<li />Un graphe comportant les températures du processeur et de la carte mère detectées par lm_sensors, ainsi que celle des disques durs avec hddtemp.
|
||||||
|
<li />Un graphe avec la vitesse de rotation du ventilateur du processeur.
|
||||||
|
<br /><b>(Il faut noter que ces valeurs dépendent entièrement du support de votre matériel par lm_sensors et hddtemp. De plus, il faut configurer correctement Smeadmin
|
||||||
|
si l'on veut que les graphes se remplissent.)</b>
|
||||||
|
<br />On peut avoir ces graphes sur différentes durées en suivant les liens du haut de la page.
|
||||||
|
</ul>
|
||||||
|
<br /><li />Page de graphes sur l'utilisation du réseau :
|
||||||
|
<ul>
|
||||||
|
<li />Un graphe sur les sessions réseau ouvertes. On monitore les connexions ftp, ssh, netbios, afp et vpn. Ces courbes correspondent au nombre de connexions tcp ouvertes sur ces services aux ports 21,22,139,548 et 1723.
|
||||||
|
<li />Un graphe avec le nombre de renouvellement de bails dhcp et le nombre de connexions samba. Il permet de mesurer l'utilisation du réseau local. Les connexions samba diffèrent ici des connexions netbios par le fait qu'un poste client peut être connecté à plusieurs partages samba en même temps, cela ne donne qu'une connexion netbios et plusieurs "connexions" samba.
|
||||||
|
<li />Un graphe avec le nombre de mails entrant/sortant (valeurs empilées) sur le serveur. Par défaut, on ne gère que les e-mails arrivant sur le domaine principal du serveur, sur les domaines virtuels du serveur, ainsi que les mails relayés par fetchmail sur des boites locales. On peut ajouter des domaines en configurant Smeadmin, mais les e-mails ne seront détectés que s'ils transitent par le serveur de messagerie de SME. On a aussi le nombre de spams rejetés par Spamassassin et le nombre de virus filtrés par ClamAV.
|
||||||
|
<li />Un graphe montrant le temps de réponse de la passerelle par défaut vers internet. La cible du ping est configurable, car il peut être utile lorsqu'on n'est pas "en frontal" sur internet de tester la latence avec un quelconque autre site, et pas avec la passerelle par défaut. Si le ping dépasse 200ms, on bride la valeur pour que le graphe reste "lisible". (ie, si on a un ping de 4s, on aurait un pic sur le graphe et rien à coté.)
|
||||||
|
<li />Deux graphes montrant le volume du trafic réseau brut passant par le serveur. Souvent, le volume entrant sur l'interface externe correspond au volume sortant sur l'interface interne, c'est tout le trafic relayé par la passerelle vers le réseau local. On peut voir sur un troisième graphe le traffic qui n'est pas du routage. Si l'on est en <code>server-only</code>, un seul graphe est affiché.
|
||||||
|
</ul>
|
||||||
|
<br /><li />Page de graphes sur l'utilisation du système :
|
||||||
|
<ul>
|
||||||
|
<li />Un premier graphe sur la proportion de processus systémes, utilisateurs et nicés dans le % d'utilisation du cpu.
|
||||||
|
<li />Un deuxième sur le load du système par rapport au % total d'utilisation du cpu.
|
||||||
|
<li />Un troisième sur le nombre de processus tournant sur le serveur, ainsi que la taille de la file d'attente des process.
|
||||||
|
<li />Enfin, un quatrième sur l'uptime du cpu.
|
||||||
|
<li />Ensuite, un graphe sur l'occupation de la mémoire vive du serveur.
|
||||||
|
<li />Et un graphe sur la taille et l'occupation de la mémoire virtuelle ou swap.
|
||||||
|
<li />Puis un graphe sur le volume brut de données érites/lues sur le disque dur du serveur.
|
||||||
|
<li />Enfin, un graphe sur l'occupation disque de composantes importantes de SME: les répertoires <code>/var/log</code> (les fichiers journaux), <code>/home/e-smith/files</code> (les fichiers des utilisateurs et les ibays), <code>/var/spool/squid</code> (la taille du cache du proxy Squid), <code>/var/lib/mysql</code> (la taille des bases de données MySQL) ainsi que l'espace restant encore disponible sur le disque dur. On peut désactiver le calcul de l'occupation disque sur ces répertoires, car sur certaines configurations, cela peut prendre beaucoup de temps et ralentir le fonctionnement général du serveur. On n'aura alors sur le graphe que l'espace disponible par rapport à l'espace total.
|
||||||
|
</ul>
|
||||||
|
<br /><li />Page de tests avancés :
|
||||||
|
<br />Cette page va servir à vérifier qu'un service répond vraiment lorsque on lui envoie un requête.
|
||||||
|
<br />En cliquant sur les diffèrents liens, on peut tester les services httpd, smbd, nmbd, popd, sshd, ftpd, smtpfont-qmail ainsi que le temps de réponse du serveur à un ping.
|
||||||
|
|
||||||
|
<br /><br /><li />Page de configuration de Smeadmin :
|
||||||
|
<br />Cette page permet de configurer le démon <code>smeadmind</code> ainsi que certains paramètres de l'interface web. La configuration est stockée dans un fichier texte. Les options sont les suivantes :
|
||||||
|
<ul>
|
||||||
|
<li /> Destinataire des messages de status, ainsi que leur fréquence. Si on met 0, ils sont désactivés.
|
||||||
|
<br /><li /> Paramètres de connexion à MySQL. On ne doit modifier ces valeurs que si on a modifié les valeurs correspondantes dans MySQL.
|
||||||
|
<br /><li /> Noms des interfaces réseaux. Logiquement, ces valeurs sont auto-détectées, mais on peut avoir besoin de les changer (p.ex 3ème interface réseau en Wi-Fi à surveiller..). On peut ajouter des domaines de courrier externes, mais il ne seront pris en compte que si les messages transitent par le serveur de messagerie de SME.
|
||||||
|
<br /><li /> Diverses options pour l'interface web.
|
||||||
|
<br /><li /> Options pour les senseurs. Bien vérifier que son matériel est supporté ou pas par lm_sensors et hddtemp, et que ces options sont correctement renseignées avant de dire "mon graphe de température ne se remplit pas".
|
||||||
|
<br /><li /> Destinataire des messages d'alertes, et limites pour le déclenchement des alertes. Les limites possibles sont : la température du matériel, le nombre de connexions ssh/ftp/vpn/netbios, l'utilisation du disque dur, du processeur, de la mémoire et le nombre d'email sortant/rentrant. Si l'on met 0 pour une alerte, elle est désactivée.
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br /><li />Page de détail du service httpd / httpd-admin :
|
||||||
|
<br />On dispose d'un graphe détaillant le % cpu, la taille de la mémoire vive alloués à des processus httpd, ainsi que leur nombre.
|
||||||
|
|
||||||
|
<br /><br /><li />Page de détail du service sshd :
|
||||||
|
<br />On donne la liste des derniès connexions administratives. On met en évidence les connexions root réssies, ainsi que toutes les tentatives de connexions infructueuses.
|
||||||
|
|
||||||
|
<br /><br /><li />Page de détail du service squid :
|
||||||
|
<br />On à un graphe détaillant le % cpu, la taille de la mémoire vive alloués à des processus squid correspondant au proxy transparent, ainsi que leur nombre.
|
||||||
|
|
||||||
|
<br /><br /><li />Page de détail du service pppoe :
|
||||||
|
<br />Elle présente l'historique des dernières connexions ADSL par pppoe, avec le début, l'ip attribuée, ainsi que la date de fin, la durée et le volume transféré durant la connexion. On met en évidence les connexions de moins de 4 heures, et les déconnexions de plus d'une minute. Ces deux paramètres peuvent être changés dans la page de configuration de Smeadmin. Ainsi, on peut observer la fiabilité/stabilité de la connexion à Internet.
|
||||||
|
|
||||||
|
<br /><br /><li />Page de détail du service dhcpd :
|
||||||
|
<br />On dispose ici de la date des derniers renouvellements de baux par les postes du réseau local, ainsi que de leurs adresses MAC, leurs IPs, et leurs nom DNS attribué par le serveur. On peut ainsi voir quelle stations ont été allumées récemment.
|
||||||
|
|
||||||
|
<br /><br /><li />Page de détail du service pptpd :
|
||||||
|
<br />On a la liste des connexions vpn effectuées sur le serveur, avec les dates de début et de fin, la durée, l'IP du client vpn, son login et le volume transféré. On met en évidence les connexions de plus de 2 heures, ce paramètre peut être changé dans la page de configuration de Smeadmin.
|
||||||
|
|
||||||
|
<br /><br /><li />Page de détail du service smb/nmb :
|
||||||
|
<br />Cette page propose tout d'abord l'historique des dernières connexions d'un triplet (machine/ip/personne) à un des partages réseau samba du serveur, ainsi que la durée approximative à cinq minutes.
|
||||||
|
<br />Ensuite elle propose le graphe détaillant le % cpu, la taille de la mémoire vive alloués aux processus gèrant samba, ainsi que leur nombre.
|
||||||
|
<br />On peut ainsi observer quels sont les postes qui utilisent fréquemment le service samba du serveur.
|
||||||
|
|
||||||
|
<br /><br /><li />Page de détail du service atalk :
|
||||||
|
<br />De la même manière cette page propose tout d'abord l'historique des dernières connexions d'une machine au service de partage de fichier avec les Macintosh du serveur avec le détail des volumes de transferts de fichiers.
|
||||||
|
<br />Ensuite elle propose le graphe détaillant le % cpu, la taille de la mémoire vive alloués aux processus gèrant ce service (papd, afpd, netatalk), ainsi que leur nombre.
|
||||||
|
<br />On peut ainsi observer quels sont les postes qui utilisent fréquemment le service atalk du serveur.
|
||||||
|
|
||||||
|
<br /><br /><li />Page de détail du service proftpd :
|
||||||
|
<br />Cette page montre la liste de connexions au service ftp du serveur, réussies ou non. Elle détaille l'adresse IP du client, son login et le volume transféré.
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p><i> Liste des fichiers installés/crées par le RPM </i>:
|
||||||
|
|
||||||
|
<code>
|
||||||
|
<br />/etc/e-smith/events/actions/smeadmin-parselog
|
||||||
|
<br />/etc/e-smith/events/logrotate/S15smeadmin-parselog
|
||||||
|
<br />/etc/e-smith/web/functions/smeadmin
|
||||||
|
<br />/etc/e-smith/web/panels/manager/cgi-bin/smeadmin
|
||||||
|
<br />/etc/e-smith/web/panels/manager/html/smeadmin/smeadmin.conf
|
||||||
|
<br />/etc/rc.d/init.d/smeadmind
|
||||||
|
<br />/etc/rc.d/rc0.d/K03smeadmind
|
||||||
|
<br />/etc/rc.d/rc1.d/K03smeadmind
|
||||||
|
<br />/etc/rc.d/rc2.d/K03smeadmind
|
||||||
|
<br />/etc/rc.d/rc3.d/S97smeadmind
|
||||||
|
<br />/etc/rc.d/rc4.d/S97smeadmind
|
||||||
|
<br />/etc/rc.d/rc5.d/S97smeadmind
|
||||||
|
<br />/etc/rc.d/rc6.d/K03smeadmind
|
||||||
|
<br />/etc/rc.d/rc7.d/S97smeadmind
|
||||||
|
<br />/usr/bin/smeadmind
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/create_mysql.sh
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/create_rrd.sh
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/create_smedb.sh
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/smeadmin-doc-fr.html
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/smeadmin-doc-en.html
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/smeadmin-fr.po
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/smeadmin-en.po
|
||||||
|
<br />/usr/share/doc/smeserver-smeadmin-1.1.0/tables.sql
|
||||||
|
<br />/usr/share/locale/en/LC_MESSAGES/smeadmin.mo
|
||||||
|
<br />/usr/share/locale/fr/LC_MESSAGES/smeadmin.mo
|
||||||
|
</code>
|
||||||
|
<br /><br /><i>Liste des répertoires utilisés </i>:
|
||||||
|
<table border=1>
|
||||||
|
<tr><th>Fichier/répertoire</th><th>Contient</th></tr>
|
||||||
|
<tr><td><code>/var/log/smeadmin.log</code></td><td>la trace du démon.</td></tr>
|
||||||
|
<tr><td><code>/var/tmp/</code></td><td>stockage temporaire des logs.</td></tr>
|
||||||
|
<tr><td><code>/var/lib/smeadmin/</code></td><td>les fichiers RRDs stockant les données pour les graphes.</td></tr>
|
||||||
|
<tr><td><code>/etc/e-smith/web/panels/manager/html/smeadmin/</code></td><td>les graphes générés et de la configuration.</td></tr>
|
||||||
|
</table>
|
||||||
|
<br />(Le programme stocke tous les graphes dans un sous-répertoire du <code>server-manager</code> ainsi l'interface est accessible via un tunnel SSH.)
|
||||||
|
</p>
|
||||||
|
<p><i> Un petit peu plus de détails </i>:
|
||||||
|
<ul>
|
||||||
|
<li />les e-mails d'alertes et de status sont envoyés avec le nom <b>smeadmin-daemon@mondomaine</b> en expéditeur, pour être bien vus dans le lecteur de mail.
|
||||||
|
<li />Un e-mail d'alerte rappelle la limite qui avait été fixée, la valeur courante, ainsi qu'une explication possible de la cause de l'alerte. De plus, on a un lien vers l'interface web pour configurer directement la limite.
|
||||||
|
<li />Un e-mail de status envoie les 10 dernières lignes de <code>/var/log/messages</code>, le nombre de connexions ouvertes sur les services critiques, la sortie de <code>netstat --numeric-hosts -tpu</code> (la liste détaillée de toutes les connexions réseau actives) ainsi que le status des services samba, http et ssh. Si on ne le reçoit pas, c'est un bon indice d'un fonctionnement anormal. (Serveur éteint, qmail arreté, pas de connexion ADSL ...)
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
Le programme est un démon, pour savoir s'il fonctionne faire :
|
||||||
|
<br /><code>service smeadmind status</code>
|
||||||
|
<br />S'il est arreté, un début d'explication peut être trouvé dans son fichier journal <code>/var/log/smeadmin.log</code>. Si vous avez des problèmes pour le redémarrer, faites <code>rm -f /var/run/smeadmin.pid</code> avant de réessayer.
|
||||||
|
<br />Il se lance automatiquement au démarrage du serveur. Lors d'un évenement <code>logrotate</code>, le système lui envoie un signal unix SIGUSR1 pour le forcer à lire les journaux qui vont être archivés.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p><i> Changelog </i>:
|
||||||
|
<br /><br />* Web Feb 01 2006 : v1.1.0 - un an pile après la derniere version majeure.
|
||||||
|
<br />- Renommage en smeserver-smeadmin.
|
||||||
|
<br />- Uniquement compatible avec SME 7 à partir de maintenant. (Sauf si BEAUCOUP de demandes => extension de compatibilité.)
|
||||||
|
<br />- Réécriture majeure, GROS nettoyage du code.
|
||||||
|
<br />- Passage des options dans un fichier de configuration.
|
||||||
|
<br />- BEAUCOUP plus de choses configurables. Gère plus de configurations correctement.
|
||||||
|
<br />- Ajout de services spécifiques SME7.
|
||||||
|
<br />- Ajout d'un lien pour configurer la limite dans les mails d'alerte.
|
||||||
|
<br />- Ajout du 'netstat -tlp' et du 'w' dans la page d'accueil.
|
||||||
|
|
||||||
|
<br /><br />* Mon Oct 03 2005 : v1.0.5 by Cyril
|
||||||
|
<br />- Correction de certains bugs pour pouvoir le lancer sur sme7.
|
||||||
|
<br />- Beaucoup de choses fonctionnent anormalement (événements non détectés) sur sme7.
|
||||||
|
|
||||||
|
<br /><br />* Tue Feb 01 2005 : v1.0.4
|
||||||
|
<br />- Passage à gettext pour toutes les sorties texte.
|
||||||
|
<br />- Traduction anglaise pour le panel et le texte des e-mails.
|
||||||
|
<br />- Fichier .po inclus pour les langue française et anglaise.
|
||||||
|
|
||||||
|
<br /><br />* Tue Sep 14 2004 : v1.0.3
|
||||||
|
<br />- Ajout de afp sur le graphe des sessions.
|
||||||
|
<br />- Modification des graphes de traffic réseau.
|
||||||
|
<br />- Modification du graphe ecriture/lecture disque.
|
||||||
|
<br />- Ajout graphe trafic serveur hors routage.
|
||||||
|
<br />- Amélioration UI et short_status (easter-egg ;)).
|
||||||
|
<br />- Correction bug client ftp anonymous.
|
||||||
|
<br />- Possibilité de désactiver les alertes.
|
||||||
|
<br />- Nettoyage /var/tmp au logrotate.
|
||||||
|
|
||||||
|
<br /><br />* Thu Aug 26 2004 : v1.0.2
|
||||||
|
<br />- Compatibilité avec la 5.6 Ok.
|
||||||
|
<br />- Prise en compte de la locale US (0.0 => 0,0).
|
||||||
|
<br />- Ajout température hd2.
|
||||||
|
<br />- Correction bugs.
|
||||||
|
<br />- Amélioration des scripts postinstall et preuninstall pour rendre possible l'upgrade.
|
||||||
|
|
||||||
|
<br /><br />* Mon Aug 9 2004 : v1.0.1
|
||||||
|
<br />- Ajout de la configuration du temps entre 2 mails de status.
|
||||||
|
<br />- Amélioration de la compatibilité avec SME 5.6.
|
||||||
|
|
||||||
|
<br /><br />* Fri Aug 6 2004 : v1.0.0
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Toutes les requêtes, questions et rapports d'erreurs sont bienvenus, et peuvent être envoyées à <code> landry at firewall - services point com</code>.
|
||||||
|
</body>
|
||||||
|
</html>
|
19
root/usr/share/doc/smeserver-smeadmin/tables-update.sql
Normal file
19
root/usr/share/doc/smeserver-smeadmin/tables-update.sql
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
USE `smeadmin`;
|
||||||
|
|
||||||
|
|
||||||
|
-- Modify one error in table construction
|
||||||
|
ALTER TABLE `pppoe` CHANGE `ip` `ip` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'
|
||||||
|
;
|
||||||
|
-- Update size of some fields
|
||||||
|
ALTER TABLE `pppoe` CHANGE `volume_in` `volume_in` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ,
|
||||||
|
CHANGE `volume_out` `volume_out` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ;
|
||||||
|
|
||||||
|
ALTER TABLE `vpn` CHANGE `volume_in` `volume_in` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ,
|
||||||
|
CHANGE `volume_out` `volume_out` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ;
|
||||||
|
|
||||||
|
ALTER TABLE `ftp` CHANGE `volume_in` `volume_in` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ,
|
||||||
|
CHANGE `volume_out` `volume_out` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ;
|
||||||
|
|
||||||
|
ALTER TABLE `afp` CHANGE `volume_write` `volume_write` INT( 20 ) UNSIGNED NULL DEFAULT NULL ,
|
||||||
|
CHANGE `volume_read` `volume_read` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ;
|
||||||
|
|
95
root/usr/share/doc/smeserver-smeadmin/tables.sql
Normal file
95
root/usr/share/doc/smeserver-smeadmin/tables.sql
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
-- Creation de la base
|
||||||
|
|
||||||
|
CREATE DATABASE IF NOT EXISTS `smeadmin` DEFAULT CHARACTER SET latin1;
|
||||||
|
|
||||||
|
USE `smeadmin`;
|
||||||
|
|
||||||
|
|
||||||
|
-- Ces tables vont garder l'historique
|
||||||
|
-- des connexions aux services sensibles
|
||||||
|
|
||||||
|
|
||||||
|
-- Structure de la table samba
|
||||||
|
|
||||||
|
create table samba (
|
||||||
|
ip int unsigned not null,
|
||||||
|
login varchar(10) not null,
|
||||||
|
-- service varchar(10) not null,
|
||||||
|
machine varchar(30) not null,
|
||||||
|
debut datetime,
|
||||||
|
derniere_vue datetime,
|
||||||
|
primary key (ip,login,machine) );
|
||||||
|
|
||||||
|
-- Structure de la table afp
|
||||||
|
|
||||||
|
create table afp (
|
||||||
|
ip int unsigned not null,
|
||||||
|
debut datetime not null,
|
||||||
|
fin datetime,
|
||||||
|
pid_afpd int unsigned not null,
|
||||||
|
login varchar(10),
|
||||||
|
volume_read bigint(20) unsigned,
|
||||||
|
volume_write bigint(20) unsigned,
|
||||||
|
primary key (debut) );
|
||||||
|
|
||||||
|
-- Structure de la table dchpd
|
||||||
|
|
||||||
|
create table dhcpd (
|
||||||
|
ip int unsigned not null,
|
||||||
|
mac varchar(18) not null,
|
||||||
|
hostname varchar(30),
|
||||||
|
debut datetime,
|
||||||
|
-- encours bool,
|
||||||
|
primary key (ip) );
|
||||||
|
|
||||||
|
-- Structure de la table ftp
|
||||||
|
|
||||||
|
create table ftp (
|
||||||
|
debut datetime not null,
|
||||||
|
fin datetime,
|
||||||
|
duree time,
|
||||||
|
ip int unsigned not null,
|
||||||
|
pid_proftpd int unsigned not null,
|
||||||
|
login varchar(10),
|
||||||
|
connecte bool,
|
||||||
|
volume_in bigint(20) unsigned,
|
||||||
|
volume_out bigint(20) unsigned,
|
||||||
|
primary key (debut) );
|
||||||
|
|
||||||
|
-- Structure de la table pppoe
|
||||||
|
|
||||||
|
create table pppoe (
|
||||||
|
debut datetime not null,
|
||||||
|
fin datetime,
|
||||||
|
duree time,
|
||||||
|
pid_pppd int unsigned not null,
|
||||||
|
ip int unsigned not null,
|
||||||
|
peer int unsigned not null,
|
||||||
|
volume_in bigint(20) unsigned,
|
||||||
|
volume_out bigint(20) unsigned,
|
||||||
|
primary key (debut) );
|
||||||
|
|
||||||
|
-- Structure de la table ssh
|
||||||
|
|
||||||
|
create table ssh (
|
||||||
|
debut datetime not null,
|
||||||
|
ip int unsigned not null,
|
||||||
|
login varchar(10) not null,
|
||||||
|
ok bool,
|
||||||
|
primary key (debut) );
|
||||||
|
|
||||||
|
-- Structure de la table vpn
|
||||||
|
|
||||||
|
create table vpn (
|
||||||
|
debut datetime not null,
|
||||||
|
fin datetime,
|
||||||
|
duree time,
|
||||||
|
ip int unsigned,
|
||||||
|
vpn_clt int unsigned,
|
||||||
|
vpn_srv int unsigned not null,
|
||||||
|
volume_in bigint unsigned,
|
||||||
|
volume_out bigint unsigned,
|
||||||
|
login varchar(10),
|
||||||
|
pid_pptpd int(20) unsigned not null,
|
||||||
|
pid_pppd int(20) unsigned,
|
||||||
|
primary key (debut) );
|
19
root/usr/share/doc/smeserver-smeadmin/update-mysql.sh
Executable file
19
root/usr/share/doc/smeserver-smeadmin/update-mysql.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
#table creation
|
||||||
|
mysql smeadmin < /usr/share/doc/smeserver-smeadmin/tables-update.sql 2>err
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo -n "Error in the modification of the tables : "
|
||||||
|
cat err
|
||||||
|
else
|
||||||
|
echo -e "Modification of tables :\t\t\t[OK]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f err
|
||||||
|
|
||||||
|
#validation des modifications
|
||||||
|
mysqladmin flush-privileges
|
||||||
|
|
||||||
|
|
244
smeserver-smeadmin.spec
Normal file
244
smeserver-smeadmin.spec
Normal file
@ -0,0 +1,244 @@
|
|||||||
|
# $Id: smeserver-smeadmin.spec,v 1.17 2019/12/07 04:05:41 jpp Exp $
|
||||||
|
# Authority: vip-ire
|
||||||
|
# Name: Daniel Berteaud
|
||||||
|
#
|
||||||
|
|
||||||
|
Summary: A graphical monitor, alert raising, and services supervision tool for your SME Server.
|
||||||
|
%define name smeserver-smeadmin
|
||||||
|
Name: %{name}
|
||||||
|
%define version 1.6
|
||||||
|
%define release 15
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}%{?dist}
|
||||||
|
License: GPL
|
||||||
|
Group: Networking/Daemons
|
||||||
|
Source: %{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
|
||||||
|
BuildArchitectures: noarch
|
||||||
|
|
||||||
|
BuildRequires: e-smith-devtools
|
||||||
|
BuildRequires: gettext
|
||||||
|
|
||||||
|
Requires: e-smith-base
|
||||||
|
Requires: smeserver-release >= 10
|
||||||
|
Requires: rrdtool-perl
|
||||||
|
Requires: rrdtool
|
||||||
|
Requires: hddtemp
|
||||||
|
Requires: sysstat
|
||||||
|
Requires: lm_sensors
|
||||||
|
#Obsoletes: smeserver-sme8admin
|
||||||
|
|
||||||
|
AutoReqProv: no
|
||||||
|
%description
|
||||||
|
The main part of smeadmin is a daemon which gathers informations from logs
|
||||||
|
and other tools like systat, it then feed a mysql database and create RRD
|
||||||
|
graphs about your system state.
|
||||||
|
This daemon can also send periodics mails (with some logs), and alerts mails
|
||||||
|
based on configurable thresolds.
|
||||||
|
|
||||||
|
A panel is also available in the server-manager, with which you can access gathered
|
||||||
|
data, display the RRD graphs and configure the service.
|
||||||
|
|
||||||
|
This contrib is a bit inspired by e-smith-sysmon from Shad Lords.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup
|
||||||
|
|
||||||
|
%build
|
||||||
|
perl createlinks
|
||||||
|
%{__mkdir_p} root/etc/e-smith/web/panels/manager/html/smeadmin
|
||||||
|
%{__mkdir_p} root/usr/share/locale/en_US/LC_MESSAGES
|
||||||
|
|
||||||
|
xgettext --from-code UTF-8 -F --no-wrap -L perl \
|
||||||
|
-o root/usr/share/locale/en_US/LC_MESSAGES/smeadmin.po \
|
||||||
|
root/etc/e-smith/web/functions/smeadmin \
|
||||||
|
root/usr/bin/smeadmind
|
||||||
|
|
||||||
|
/sbin/e-smith/generate-lexicons
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
|
||||||
|
rm -f %{name}-%{version}-filelist
|
||||||
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
||||||
|
--file /usr/bin/smeadmind 'attr(755,root,root)' \
|
||||||
|
--file /usr/share/doc/smeserver-smeadmin/add_ds_to_rrd.pl 'attr(755,root,root)' \
|
||||||
|
> %{name}-%{version}-filelist
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%pre
|
||||||
|
|
||||||
|
%preun
|
||||||
|
|
||||||
|
%post
|
||||||
|
|
||||||
|
%postun
|
||||||
|
|
||||||
|
%files -f %{name}-%{version}-filelist
|
||||||
|
%defattr(-,root,root)
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sat Sep 07 2024 cvs2git.sh aka Brian Read <brianr@koozali.org> 1.6-15.sme
|
||||||
|
- Roll up patches and move to git repo [SME: 12338]
|
||||||
|
|
||||||
|
* Sat Sep 07 2024 BogusDateBot
|
||||||
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
|
||||||
|
by assuming the date is correct and changing the weekday.
|
||||||
|
|
||||||
|
* Fri Sep 06 2024 Terry Fage <terry@fage.id.au> 1.6-14.sme
|
||||||
|
- apply locale 2024-09-06.patch
|
||||||
|
|
||||||
|
* Sun May 19 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-13.sme
|
||||||
|
- fix pppoe not loging [SME: 12684]
|
||||||
|
increase db volume field. filter display to last 24 months
|
||||||
|
display in GB/MB instead of GiB/kiB
|
||||||
|
|
||||||
|
* Fri Dec 22 2023 Jean-Philippe Pialasse <tests@pialasse.com> 1.6-12.sme
|
||||||
|
- add accounting of auth_failed [SME: 12447]
|
||||||
|
adding php8* services
|
||||||
|
- fix translation, reworked [SME: 10244]
|
||||||
|
|
||||||
|
* Fri Nov 11 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.6-10.sme
|
||||||
|
- apply locale 2022-11-11 patch
|
||||||
|
|
||||||
|
* Sun Sep 18 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.6-9.sme
|
||||||
|
- fix misisng stopped services [SME: 11643]
|
||||||
|
|
||||||
|
* Sat Jul 30 2022 Brian Read <brianr@bjsystems.co.uk> 1.6-8.sme
|
||||||
|
- Re-build and link to latest devtools [SME: 11997]
|
||||||
|
|
||||||
|
* Fri Jul 29 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.6-7.sme
|
||||||
|
- apply translation 2022-07-29
|
||||||
|
- add to core backup [SME: 12023]
|
||||||
|
|
||||||
|
* Mon Jul 18 2022 zsolt vasarhelyi <vasarhelyizsolt@hotmail.com> 1.6-6.sme
|
||||||
|
- bz11642 authproxy errorlog [SME: 11642]
|
||||||
|
- bz11590 error log [SME: 11590]
|
||||||
|
|
||||||
|
* Mon Jul 18 2022 Michel Begue <mab974@misouk.com> 1.6-5.sme
|
||||||
|
- get real ssh port from configuration db. [SME: 10761]
|
||||||
|
|
||||||
|
* Wed Sep 08 2021 Terry Fage <terry.fage@gmail.com> 1.6-4.sme
|
||||||
|
- apply locale 2021-09-08 patch
|
||||||
|
|
||||||
|
* Tue Aug 24 2021 Terry Fage <terry.fage@gmail.com> 1.6-3.sme
|
||||||
|
- apply locale 2021-08-24 patch
|
||||||
|
|
||||||
|
* Thu Mar 25 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.6-2.sme
|
||||||
|
- Re-build and link to latest devtools mysql not migrating sme9admind [SME: 11062]
|
||||||
|
- Re-build and link to latest devtools config db sme9admind not migrated to smeadmind
|
||||||
|
- Re-build and link to latest devtools /var/lib/sme9admin not migrated
|
||||||
|
- add smeserver-smeadmin-update event
|
||||||
|
- Re-build and link to latest devtools services diplayed multiple times [SME: 11455]
|
||||||
|
- systemd unit
|
||||||
|
- review new logs locations
|
||||||
|
- check calls to sysvinit
|
||||||
|
- TODO implement new VPNs stats
|
||||||
|
|
||||||
|
* Thu Oct 15 2020 Brian Read <brianr@bjsystems.co.uk> 1.6-1
|
||||||
|
- Move to SME10, rename to smeadmin [SME: 11040, 11062]
|
||||||
|
|
||||||
|
* Sat Dec 07 2019 SME Translation Server <translations@contribs.org> 1.5-30.sme
|
||||||
|
- apply locale 2019-12-07 patch
|
||||||
|
|
||||||
|
* Mon Sep 09 2019 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-29.sme
|
||||||
|
- Re-build and link to latest devtools smeadmind die on mysql connection error [SME: 7683]
|
||||||
|
|
||||||
|
* Sat Dec 02 2017 SME Translation Server <translations@contribs.org> 1.5-28.sme
|
||||||
|
- apply locale 2017-12-02 patch
|
||||||
|
|
||||||
|
* Mon Aug 14 2017 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-27.sme
|
||||||
|
- add support for altqmail [SME: 10409]
|
||||||
|
|
||||||
|
* Mon Jul 10 2017 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-26.sme
|
||||||
|
- Re-build and link to latest devtools error after migrating sme8admin db, unable to access mysql db [SME: 10181]
|
||||||
|
|
||||||
|
* Sat Mar 25 2017 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-25.sme
|
||||||
|
- apply locale 2017-03-26 patch
|
||||||
|
|
||||||
|
* Wed Feb 01 2017 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-24.sme
|
||||||
|
- apply locale 2017-02-02.patch
|
||||||
|
|
||||||
|
* Sun Jan 01 2017 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-23.sme
|
||||||
|
- Re-build and link to latest devtools warning related to raid detection code [SME: 9886]
|
||||||
|
- Re-build and link to latest devtools warning related to non existing services removed sinces previous versions [SME: 9889]
|
||||||
|
|
||||||
|
* Tue Dec 20 2016 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-22.sme
|
||||||
|
- make CGI and pictures utf8 compliant [SME: 9894]
|
||||||
|
- apply smeserver-smeadmin-1.5-locale-2016-12-20.patch
|
||||||
|
|
||||||
|
* Sat Dec 17 2016 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-21.sme
|
||||||
|
- locals smeserver-smeadmin-1.5-locale-2016-12-18.patch
|
||||||
|
|
||||||
|
* Sat Dec 17 2016 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-20.sme
|
||||||
|
- Re-build and link to latest devtools last patch by adding path to called programs
|
||||||
|
|
||||||
|
* Thu Dec 15 2016 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-19.sme
|
||||||
|
- Re-build and link to latest devtools bad accounting for incoming and outgoing mail [SME: 8818]
|
||||||
|
- mail_in alert now account for all queued emails from qpsmtpd and sqpsmtpd
|
||||||
|
- mail_out alert now account for qmail total remote delivery attempts
|
||||||
|
- known issue : on first run will account more than 5 minutes ( whole log) and will alert for exceeding amount
|
||||||
|
- added accounting of qpsmtpd and sqpsmtpd code
|
||||||
|
- TODO: alert on qmail queue too high, alert on too many qpsmtpd connections
|
||||||
|
|
||||||
|
* Wed Nov 23 2016 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-18.sme
|
||||||
|
- Re-build and link to latest devtools limited size in mysql fields for traffic accounting [SME: 8399]
|
||||||
|
|
||||||
|
* Wed Nov 23 2016 Jean-Philippe Pialasse <tests@pialasse.com> 1.5-16.sme
|
||||||
|
- add more verbose email alert [SME: 9725]
|
||||||
|
|
||||||
|
* Fri Aug 21 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.5-15.sme
|
||||||
|
- Initial release to contribs9
|
||||||
|
|
||||||
|
* Wed Dec 24 2014 stephane de labrusse <stephdl@de-labrusse.fr> 1.5-14.sme
|
||||||
|
- changed $mypid = `cat $mypid` by open(FIC,"<$mypid") [SME:8740]
|
||||||
|
|
||||||
|
* Tue Dec 23 2014 stephane de labrusse <stephdl@de-labrusse.fr> 1.5-13.sme
|
||||||
|
- Corrected bug of empty pids [SME:8732]
|
||||||
|
- Added exeption if the server is not in server & gateway [SME:8739]
|
||||||
|
|
||||||
|
* Thu Dec 11 2014 stephane de labrusse <stephdl@de-labrusse.fr> 1.5-12.sme
|
||||||
|
- corrected the dhcpd lease not reported [SME:8724]
|
||||||
|
|
||||||
|
* Tue Nov 25 2014 stephane de labrusse <stephdl@de-labrusse.fr> 1.5-11.sme
|
||||||
|
- Added a restart to smeadmind when settings are changed in the smeadmin panel
|
||||||
|
|
||||||
|
* Sat Nov 22 2014 stephane de labrusse <stephdl@de-labrusse.fr> 1.5-10.sme
|
||||||
|
- added a second fan speed sensors
|
||||||
|
- added four HD TEMP sensors
|
||||||
|
- added a new graph only for hd temperature sensor
|
||||||
|
- added an event smeadmin-update for avoiding to restart the server
|
||||||
|
- added a tab to check the raid status
|
||||||
|
|
||||||
|
* Sun Nov 16 2014 stephane de labrusse <stephdl@de-labrusse.fr> 1.5-9.sme
|
||||||
|
- Changed in smeadmind L937 °C in .{1,2} .... Thanks JPP
|
||||||
|
|
||||||
|
* Fri Nov 14 2014 stephane de labrusse <stephdl@de-labrusse.fr> 1.5-8.sme
|
||||||
|
- Added a service in rc7.d for lm_sensors
|
||||||
|
- added to sadf the -S to collect swap data
|
||||||
|
- changed txbyt/rxbyt to rxkB/txkB for collecting network load
|
||||||
|
|
||||||
|
* Mon Sep 01 2014 stephane de labrusse <stephdl@de-labrusse.fr> 1.5-7.sme
|
||||||
|
- added 755 to /usr/bin/smeadmind
|
||||||
|
|
||||||
|
* Wed Jun 18 2014 stephane de labrusse <stephdl@de-labrusse.fr> 1.5-6.sme
|
||||||
|
- Initial release to sme9
|
||||||
|
|
||||||
|
* Sun Dec 15 2013 Jean-Philippe Pialasse <tests@pialasse.com> 1.3-4.sme
|
||||||
|
- Re-build and link to latest devtools obsolete missing [SME: 7109]
|
||||||
|
- Re-build and link to latest devtools pppoe and vpn loging [SME: 8061]
|
||||||
|
- added monthly ppoe log
|
||||||
|
- Re-build and link to latest devtools stop on mysql error too many connections [SME: 7683]
|
||||||
|
|
||||||
|
* Sun Sep 09 2012 Jean-Philippe Pialasse <tests@pialasse.com> 1.3-3.sme
|
||||||
|
- startup fix [SME 3022]
|
||||||
|
|
||||||
|
* Wed Aug 15 2012 Jean-Philippe Pialasse <tests@pialasse.com> 1.3-2.sme
|
||||||
|
- 64 bits [SME 7040]
|
||||||
|
|
||||||
|
* Sun Jun 10 2012 Jean-Philippe Pialasse <tests@pialasse.com> 1.3-1.sme
|
||||||
|
- Initial version
|
||||||
|
|
Loading…
Reference in New Issue
Block a user