mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-21 08:42:23 +00:00
Update to 20100109
PR: 146713 Submitted by: Dirk-Willem van Gulik Feature safe: yes
This commit is contained in:
parent
220e621c57
commit
53b8baf462
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=268574
@ -6,8 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= argus-monitor
|
||||
PORTVERSION= 20060722
|
||||
PORTREVISION= 4
|
||||
PORTVERSION= 20100109
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= http://www.tcp4me.com/code/argus-archive/
|
||||
DISTNAME= argus-dev-${PORTVERSION}
|
||||
@ -16,13 +15,22 @@ EXTRACT_SUFX= .tgz
|
||||
MAINTAINER= brock@cotcomsol.com
|
||||
COMMENT= Argus - The All Seeing System and Network Monitoring Software
|
||||
|
||||
SUB_FILES= pkg-message apache.conf
|
||||
SUB_LIST= PORTNAME=${PORTNAME} APACHEETCDIR=${APACHEETCDIR}
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
EXTRA_PATCHES= ${FILESDIR}/patch.001
|
||||
|
||||
LICENSE= ART10
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}
|
||||
USE_PERL5= yes
|
||||
USE_RC_SUBR= argusd
|
||||
HAS_CONFIGURE= yes
|
||||
USE_APACHE= 1.3+
|
||||
CONFIGURE_SCRIPT= Configure
|
||||
CONFIGURE_ARGS= --bin_dir=${PREFIX}/bin --sbin_dir=${PREFIX}/sbin \
|
||||
--lib_dir=${PREFIX}/lib/argus-monitor --data_dir=${PREFIX}/etc/argus-monitor
|
||||
--lib_dir=${PREFIX}/lib/argus-monitor --data_dir=${PREFIX}/etc/argus-monitor \
|
||||
--cgi_dir=${PREFIX}/www/${PORTNAME}/cgi-bin
|
||||
|
||||
OPTIONS= QPAGE "qpage support" Off \
|
||||
FPING "fping support" Off \
|
||||
@ -45,4 +53,17 @@ BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/GD.pm:${PORTSDIR}/graphics/p5-GD
|
||||
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/GD.pm:${PORTSDIR}/graphics/p5-GD
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${PREFIX}/www/${PORTNAME} ${PREFIX}/www/${PORTNAME}/docroot ${PREFIX}/www/${PORTNAME}/docroot/img ${PREFIX}/www/${PORTNAME}/docroot/sound ${PREFIX}/etc/argus-monitor/notify
|
||||
${CP} ${WRKSRC}/misc/argus.css ${WRKSRC}/misc/argus.js ${PREFIX}/www/${PORTNAME}/docroot
|
||||
${CP} ${WRKSRC}/misc/argus.logo.gif ${WRKSRC}/misc/nospkr.gif ${WRKSRC}/misc/sad.gif ${WRKSRC}/misc/sadred.gif ${WRKSRC}/misc/smile.gif ${PREFIX}/www/${PORTNAME}/docroot/img
|
||||
${CP} ${WRKSRC}/misc/whoopwhoop.wav ${PREFIX}/www/${PORTNAME}/docroot/sound
|
||||
${TOUCH} ${PREFIX}/etc/argus-monitor/notno ${PREFIX}/etc/argus-monitor/log
|
||||
${CHMOD} 755 ${PREFIX}/www/${PORTNAME} ${PREFIX}/www/${PORTNAME}/docroot ${PREFIX}/www/${PORTNAME}/docroot/img ${PREFIX}/www/${PORTNAME}/docroot/sound ${PREFIX}/etc/argus-monitor/notify
|
||||
${CHMOD} 644 ${PREFIX}/www/${PORTNAME}/docroot/argus.* ${PREFIX}/www/${PORTNAME}/docroot/img/*.gif ${PREFIX}/www/${PORTNAME}/docroot/sound/*.wav ${PREFIX}/etc/argus-monitor/notno ${PREFIX}/etc/argus-monitor/log
|
||||
${MKDIR} ${PREFIX}/${APACHEETCDIR}/Includes
|
||||
${INSTALL_DATA} ${WRKDIR}/apache.conf ${PREFIX}/${APACHEETCDIR}/Includes/${PORTNAME}.conf.sample
|
||||
@${ECHO_CMD}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,3 +1,2 @@
|
||||
MD5 (argus-dev-20060722.tgz) = 8118f8faebb5e54b7e76a842a0716a65
|
||||
SHA256 (argus-dev-20060722.tgz) = 9e380e1caa28da06489258952fefee74e92afa896c675013beea5510187c2ba1
|
||||
SIZE (argus-dev-20060722.tgz) = 306604
|
||||
SHA256 (argus-dev-20100109.tgz) = c6879862f282a5f22db705e6c416a4c40aaba3de8e59b373c0d53b35a3d1347c
|
||||
SIZE (argus-dev-20100109.tgz) = 389465
|
||||
|
27
net-mgmt/argus-monitor/files/apache.conf.in
Normal file
27
net-mgmt/argus-monitor/files/apache.conf.in
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
|
||||
# The CGI script is served from the default apache
|
||||
# cgi-bin directory; we single this URL out from
|
||||
# the normal alias parsing below.
|
||||
#
|
||||
ScriptAliasMatch ^/argus/$ "%%PREFIX%%/www/%%PORTNAME%%/cgi-bin/arguscgi"
|
||||
ScriptAlias ^/argus/cgi-bin/$ "%%PREFIX%%/www/%%PORTNAME%%/cgi-bin/"
|
||||
|
||||
<Directory "%%PREFIX%%/www/%%PORTNAME%%/cgi-bin">
|
||||
options ExecCGI
|
||||
AllowOverride none
|
||||
allow from all
|
||||
</Directory>
|
||||
|
||||
# Support for the logo, css and javascript files. The minimal set
|
||||
# needed are /sound/whoopwhoop.wav, /img/argus.logo.gif, /img/smile.gif
|
||||
# /img/sad.gif, /img/nospkr.gif and on top level /argus.css and
|
||||
# optionally /argus.js.
|
||||
#
|
||||
Alias /argus/ "%%PREFIX%%/www/%%PORTNAME%%/docroot/"
|
||||
|
||||
<Directory "%%PREFIX%%/www/%%PORTNAME%%/docroot">
|
||||
options none
|
||||
AllowOverride none
|
||||
allow from all
|
||||
</Directory>
|
@ -15,7 +15,20 @@ name="argusd"
|
||||
rcvar=${name}_enable
|
||||
|
||||
command=%%PREFIX%%/sbin/${name}
|
||||
pidfile=/var/run/${name}.pid
|
||||
# pidfile=/var/run/${name}.pid
|
||||
required_files="
|
||||
%%PREFIX%%/etc/argus-monitor/log \
|
||||
%%PREFIX%%/etc/argus-monitor/notno \
|
||||
%%PREFIX%%/etc/argus-monitor/config \
|
||||
%%PREFIX%%/etc/argus-monitor/users"
|
||||
|
||||
stop_cmd="%%PREFIX%%/sbin/argusctl shutdown reason=\"rc.argusd stop\""
|
||||
|
||||
start_precmd="/usr/bin/touch %%PREFIX%%/etc/argus-monitor/log"
|
||||
extra_commands="console hup"
|
||||
console_cmd="%%PREFIX%%/sbin/argusctl -k console"
|
||||
hup_cmd="%%PREFIX%%/sbin/argusctl -k hup"
|
||||
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
|
180
net-mgmt/argus-monitor/files/patch.001
Normal file
180
net-mgmt/argus-monitor/files/patch.001
Normal file
@ -0,0 +1,180 @@
|
||||
Index: src/Argus::SNMP.pm
|
||||
===================================================================
|
||||
--- src/Argus::SNMP.pm (revision 674)
|
||||
+++ src/Argus::SNMP.pm (revision 677)
|
||||
@@ -19,6 +19,8 @@
|
||||
use Argus::SNMP::Helper;
|
||||
my( $HAVE_MD5, $HAVE_SHA1, $HAVE_HMAC, $HAVE_DES, $HAVE_AES);
|
||||
|
||||
+$::path_snmptranslate = 'snmptranslate' unless defined $::path_snmptranslate;
|
||||
+
|
||||
BEGIN {
|
||||
# these are used for SNMPv3 auth + priv
|
||||
eval{ require Digest::MD5; $HAVE_MD5 = 1; };
|
||||
@@ -330,10 +332,13 @@
|
||||
$me->{uname} = "SNMP_$table\_$idx\_$me->{ip}{hostname}";
|
||||
|
||||
$me->helper_init($cf);
|
||||
- }else{
|
||||
+ } else {
|
||||
return $cf->error( "invalid OID ($me->{snmp}{oid})" );
|
||||
- }
|
||||
-
|
||||
+ };
|
||||
+
|
||||
+ ($me->{info}) = oid2info($oid)
|
||||
+ unless defined $me->{info};
|
||||
+
|
||||
$me;
|
||||
}
|
||||
|
||||
@@ -1034,26 +1039,96 @@
|
||||
################################################################
|
||||
# read-config callback
|
||||
# load MIB2SCHEMA format file of name to oid translations
|
||||
+# Typically generated with something like
|
||||
+# snmptranslate -mALL -Tz
|
||||
+#
|
||||
sub load_mibfile {
|
||||
my $file = shift;
|
||||
+
|
||||
+ for my $f (split /\s+/, $file){
|
||||
+ # If the magic name 'auto' is used - try to create an automatic
|
||||
+ # mib2schema file using a net-snmp tool. Cache this file if
|
||||
+ # possible - but regenerate as needed.
|
||||
+ #
|
||||
+ if ($f eq 'auto') {
|
||||
+ $f = "$::path_snmptranslate -mALL -Tz |";
|
||||
+ my $cache = $::datadir.'/gcache/mib2schema.txt';
|
||||
+ if ((!-r $cache) && (open MIB, '>'.$cache) && (open TRS, $f)) {
|
||||
+ print MIB "# Generated from $f - ".scalar(gmtime(time))."\n";
|
||||
+ while(<TRS>) { print MIB; };
|
||||
+ close TRS;
|
||||
+ close MIB and $f = $cache;
|
||||
+ };
|
||||
+ };
|
||||
|
||||
- for my $f (split /\s+/, $file){
|
||||
unless( open(MIB, $f) ){
|
||||
- ::warning("cannot open mibfile '$file': $!");
|
||||
+ ::warning("cannot open mibfile '$f' (from '$file'): $!");
|
||||
next;
|
||||
}
|
||||
-
|
||||
- while(<MIB>){
|
||||
+
|
||||
+ my($name, $oid);
|
||||
+ while(<MIB>) {
|
||||
chop;
|
||||
s/\"//g;
|
||||
- my($name, $oid) = split /\s+/;
|
||||
+ s/^\s+//g;
|
||||
+ s/\s+$//g;
|
||||
+ s/\s+/ /g;
|
||||
+ next unless ($name, $oid) = split /\s+/;
|
||||
$OIDS{$name} = { oid => $oid }; # RSN more...
|
||||
}
|
||||
close MIB;
|
||||
}
|
||||
}
|
||||
|
||||
+# IF-MIB::ifHCOutOctets
|
||||
+# ifHCOutOctets OBJECT-TYPE
|
||||
+# -- FROM IF-MIB
|
||||
+# SYNTAX Counter64
|
||||
+# MAX-ACCESS read-only
|
||||
+# STATUS current
|
||||
+# DESCRIPTION "The total number of octets transmitted out of the
|
||||
+# interface, including framing characters. This object is a
|
||||
+# 64-bit version of ifOutOctets.
|
||||
+#
|
||||
+# Discontinuities in the value of this counter can occur at
|
||||
+# re-initialization of the management system, and at other
|
||||
+# times as indicated by the value of
|
||||
+# ifCounterDiscontinuityTime."
|
||||
+# ::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) ifMIB(31) ifMIBObjects(1) ifXTable(1) ifXEntry(1) 10 }
|
||||
|
||||
+my %oid2info = ();
|
||||
+sub oid2info {
|
||||
+ my ($oid) = @_;
|
||||
+
|
||||
+ return ()
|
||||
+ unless $oid =~ m/^[\d\.]+$/;
|
||||
+
|
||||
+ return @{$oid2info{$oid}}
|
||||
+ if defined $oid2info{$oid};
|
||||
+
|
||||
+ my $cache = $::datadir.'/gcache/'.$oid.'.txt';
|
||||
+ return (<FH>)
|
||||
+ if (open(FH,$cache));
|
||||
+
|
||||
+ # Intentionally ignore errors - so we 'cache' these too.
|
||||
+ #
|
||||
+ open(FH,"$::path_snmptranslate -mALL -Td $oid|");
|
||||
+ my $body = join('',<FH>);
|
||||
+ close(FH);
|
||||
+
|
||||
+ my $syn = $1 if $body =~ m/SYNTAX\s+(\w+)/s;
|
||||
+ my $desc = $1 if $body =~ m/\s+DESCRIPTION\s+\"([^"]+)\"/s;
|
||||
+
|
||||
+ $desc =~ s/\r?\n\r?\n/<p>/g;
|
||||
+ $desc =~ s/\s+/ /g;
|
||||
+
|
||||
+ # We also try to cache 'non' results
|
||||
+ if (open(CH,'>'.$cache)) { print CH "$desc\n$syn\n";close(CH); };
|
||||
+ $oid2info{$oid} = \[$desc,$syn];
|
||||
+ return ($desc,$syn);
|
||||
+};
|
||||
+
|
||||
+
|
||||
################################################################
|
||||
|
||||
Doc::register( $doc );
|
||||
Index: src/Conf.pm
|
||||
===================================================================
|
||||
--- src/Conf.pm (revision 674)
|
||||
+++ src/Conf.pm (revision 677)
|
||||
@@ -84,10 +84,10 @@
|
||||
},
|
||||
|
||||
mibfile => {
|
||||
- descr => 'pathname of SNMP MIB translation file (MIB2SCHEMA format)',
|
||||
+ descr => 'pathname of SNMP MIB translation file (MIB2SCHEMA format). Use "auto" to create one on the fly based on "snmptranslate" its mALL MIB collection. "auto" requires the net snmp package to be installed.',
|
||||
attrs => ['config', 'top', 'multi'],
|
||||
versn => '3.5',
|
||||
- callback => \&SNMP::load_mibfile,
|
||||
+ callback => \&Argus::SNMP::load_mibfile,
|
||||
},
|
||||
|
||||
resolv_timeout => {
|
||||
Index: src/Service.pm
|
||||
===================================================================
|
||||
--- src/Service.pm (revision 674)
|
||||
+++ src/Service.pm (revision 677)
|
||||
@@ -676,7 +676,7 @@
|
||||
if( $k eq 'ovstatus' || $k eq 'flags' ){
|
||||
$vv = "<L10N $v>";
|
||||
}
|
||||
- print $fh "<TR><TD><L10N $kk></TD><TD$x>$vv</TD></TR>\n" if defined($v);
|
||||
+ print $fh "<TR><TD VALIGN=TOP><L10N $kk></TD><TD$x>$vv</TD></TR>\n" if defined($v);
|
||||
if( $k eq 'ovstatus' && $v eq 'down' && $s->{showreason} && $s->{reason} ){
|
||||
print $fh "<TR><TD>...<L10N because></TD><TD>$me->{srvc}{reason}</TD></TR>\n";
|
||||
}
|
||||
Index: examples/config-new-features
|
||||
===================================================================
|
||||
--- examples/config-new-features (revision 674)
|
||||
+++ examples/config-new-features (revision 677)
|
||||
@@ -348,3 +348,13 @@
|
||||
notifyaudit: auditlog:
|
||||
|
||||
|
||||
+# Load a MIB2SCHEMA translation file (white space separated OID/human-readable name). Typically
|
||||
+# generated with the 'snmptranslate' command form toolkits such at net-snmp.
|
||||
+#
|
||||
+mibfile: /var/argus/mibs.txt
|
||||
+
|
||||
+# The magic filename 'auto' will generate above (and cache such in gcache) using
|
||||
+# the 'ALL' mibs known to net-snmp. Requires the latter to be installed.
|
||||
+#
|
||||
+mibfile: auto
|
||||
+
|
17
net-mgmt/argus-monitor/files/pkg-message.in
Normal file
17
net-mgmt/argus-monitor/files/pkg-message.in
Normal file
@ -0,0 +1,17 @@
|
||||
================================================================================
|
||||
An apache configuration file has been created which maps /%%PORTNAME%%/:
|
||||
|
||||
%%PREFIX%%/%%APACHEETCDIR%%/Includes/%%PORTNAME%%.conf.sample
|
||||
%%PREFIX%%/%%APACHEETCDIR%%/Includes/%%PORTNAME%%.conf.sample
|
||||
|
||||
Edit it, move it in place. Next move and edit
|
||||
|
||||
%%PREFIX%%/etc/%%PORTNAME%%/config.example
|
||||
%%PREFIX%%/etc/%%PORTNAME%%/users.example
|
||||
|
||||
into place, then restart apache.
|
||||
|
||||
Ensure that ensure that argus_enable=YES is set in your rc.conf prior to
|
||||
starting the argusd daemon.
|
||||
|
||||
================================================================================
|
@ -2,8 +2,10 @@ bin/argus-config
|
||||
etc/argus-monitor/config.example
|
||||
etc/argus-monitor/locale/de_DE
|
||||
etc/argus-monitor/locale/el_gr
|
||||
etc/argus-monitor/locale/eubonics
|
||||
etc/argus-monitor/locale/fr_fr
|
||||
etc/argus-monitor/locale/lt_LT
|
||||
etc/argus-monitor/locale/nl_NL
|
||||
etc/argus-monitor/locale/ru_RU
|
||||
etc/argus-monitor/locale/piglatin
|
||||
etc/argus-monitor/locale/sp_ar
|
||||
etc/argus-monitor/locale/template
|
||||
@ -13,7 +15,6 @@ etc/argus-monitor/users.example
|
||||
lib/argus-monitor/Alias.pm
|
||||
lib/argus-monitor/Argus/Agent.pm
|
||||
lib/argus-monitor/Argus/Asterisk.pm
|
||||
lib/argus-monitor/Argus/BER.pm
|
||||
lib/argus-monitor/Argus/Ctl.pm
|
||||
lib/argus-monitor/Argus/Encode.pm
|
||||
lib/argus-monitor/Argus/IP.pm
|
||||
@ -38,7 +39,6 @@ lib/argus-monitor/DataBase.pm
|
||||
lib/argus-monitor/Doc.pm
|
||||
lib/argus-monitor/Error.pm
|
||||
lib/argus-monitor/Graph.pm
|
||||
lib/argus-monitor/GraphData.pm
|
||||
lib/argus-monitor/Group.pm
|
||||
lib/argus-monitor/LICENSE
|
||||
lib/argus-monitor/LOCATION
|
||||
@ -52,7 +52,6 @@ lib/argus-monitor/Ping.pm
|
||||
lib/argus-monitor/Prog.pm
|
||||
lib/argus-monitor/README
|
||||
lib/argus-monitor/Resolv.pm
|
||||
lib/argus-monitor/SNMP.pm
|
||||
lib/argus-monitor/SSL.pm
|
||||
lib/argus-monitor/Self.pm
|
||||
lib/argus-monitor/Server.pm
|
||||
@ -78,16 +77,56 @@ lib/argus-monitor/web_notify.pl
|
||||
lib/argus-monitor/web_override.pl
|
||||
lib/argus-monitor/web_page.pl
|
||||
lib/argus-monitor/web_utils.pl
|
||||
lib/argus-monitor/Argus/HashDir.pm
|
||||
lib/argus-monitor/Argus/MonEl/Expand.pm
|
||||
lib/argus-monitor/Argus/MonEl/Noise.pm
|
||||
lib/argus-monitor/Argus/MonEl/Trans.pm
|
||||
lib/argus-monitor/Argus/Archivist.pm
|
||||
lib/argus-monitor/Argus/Archive.pm
|
||||
lib/argus-monitor/Argus/Web/Overview.pm
|
||||
lib/argus-monitor/Argus/ReadConfig.pm
|
||||
lib/argus-monitor/Argus/Schedule.pm
|
||||
lib/argus-monitor/Argus/SNMP.pm
|
||||
lib/argus-monitor/Argus/SNMP/Helper.pm
|
||||
lib/argus-monitor/Argus/Freeswitch.pm
|
||||
lib/argus-monitor/Argus/Compute.pm
|
||||
lib/argus-monitor/Argus/Graph/Data.pm
|
||||
lib/argus-monitor/Encoding/BER.pm
|
||||
lib/argus-monitor/Encoding/BER/SNMP.pm
|
||||
lib/argus-monitor/DARP.pm
|
||||
lib/argus-monitor/DARP/Master.pm
|
||||
lib/argus-monitor/DARP/Slave.pm
|
||||
lib/argus-monitor/DARP/Service.pm
|
||||
lib/argus-monitor/DARP/Conf.pm
|
||||
lib/argus-monitor/DARP/Watch.pm
|
||||
lib/argus-monitor/DARP/Misc.pm
|
||||
lib/argus-monitor/web_web20.pl
|
||||
sbin/argus-agent
|
||||
sbin/arguscgi
|
||||
sbin/argusctl
|
||||
sbin/argusd
|
||||
sbin/argusvxml
|
||||
%%APACHEETCDIR%%/Includes/argus-monitor.conf.sample
|
||||
www/argus-monitor/docroot/argus.css
|
||||
www/argus-monitor/docroot/argus.js
|
||||
www/argus-monitor/docroot/img/argus.logo.gif
|
||||
www/argus-monitor/docroot/img/nospkr.gif
|
||||
www/argus-monitor/docroot/img/sad.gif
|
||||
www/argus-monitor/docroot/img/sadred.gif
|
||||
www/argus-monitor/docroot/img/smile.gif
|
||||
www/argus-monitor/docroot/sound/whoopwhoop.wav
|
||||
www/argus-monitor/cgi-bin/arguscgi
|
||||
www/argus-monitor/cgi-bin/argusvxml
|
||||
@dirrm lib/argus-monitor/DNS
|
||||
@dirrm lib/argus-monitor/Chart
|
||||
@dirrm lib/argus-monitor/Argus/SIP
|
||||
@dirrm lib/argus-monitor/Argus/RPC
|
||||
@dirrm lib/argus-monitor/Argus/MonEl
|
||||
@dirrm lib/argus-monitor/Argus/Web
|
||||
@dirrm lib/argus-monitor/Argus/SNMP
|
||||
@dirrm lib/argus-monitor/Argus/Graph
|
||||
@dirrm lib/argus-monitor/Argus
|
||||
@dirrm lib/argus-monitor/DARP
|
||||
@dirrm lib/argus-monitor/Encoding/BER
|
||||
@dirrm lib/argus-monitor/Encoding
|
||||
@dirrm lib/argus-monitor
|
||||
@dirrm etc/argus-monitor/stats
|
||||
@dirrm etc/argus-monitor/perl
|
||||
@ -97,3 +136,8 @@ sbin/argusvxml
|
||||
@dirrm etc/argus-monitor/gdata
|
||||
@dirrm etc/argus-monitor/gcache
|
||||
@dirrm etc/argus-monitor
|
||||
@dirrm www/argus-monitor/docroot/img
|
||||
@dirrm www/argus-monitor/docroot/sound
|
||||
@dirrm www/argus-monitor/docroot
|
||||
@dirrm www/argus-monitor/cgi-bin
|
||||
@dirrm www/argus-monitor
|
||||
|
Loading…
Reference in New Issue
Block a user