Compare commits
18 Commits
Author | SHA1 | Date |
---|---|---|
Daniel Berteaud | b81a6d1237 | |
Daniel Berteaud | 85fb39af13 | |
Daniel Berteaud | 905bfdce90 | |
Daniel Berteaud | 972ef40482 | |
Daniel Berteaud | 437332781d | |
Daniel Berteaud | fbc8f88ae0 | |
Daniel Berteaud | 8206e8796e | |
Daniel Berteaud | 3e23c01d30 | |
Daniel Berteaud | ca89c3027d | |
Daniel Berteaud | e9f44d8d03 | |
Daniel Berteaud | 4cd1050cfc | |
Daniel Berteaud | 1dedbd22bf | |
Daniel Berteaud | 7bdf91d788 | |
Daniel Berteaud | b684b4db0a | |
Daniel Berteaud | a4d7a2a48a | |
Daniel Berteaud | 22d6a1eaaa | |
Daniel Berteaud | 2d482d9675 | |
Daniel Berteaud | 3bd3ee67e0 |
|
@ -0,0 +1,3 @@
|
|||
the .tito/packages directory contains metadata files
|
||||
named after their packages. Each file has the latest tagged
|
||||
version and the project's relative directory.
|
|
@ -0,0 +1 @@
|
|||
0.4.8-1 ./
|
|
@ -0,0 +1 @@
|
|||
../../tito_libs/releasers.conf
|
|
@ -0,0 +1,6 @@
|
|||
[buildconfig]
|
||||
builder = tito.builder.Builder
|
||||
tagger = tito.tagger.VersionTagger
|
||||
changelog_do_not_remove_cherrypick = 0
|
||||
changelog_format = %s (%ae)
|
||||
lib_dir = ../tito_libs
|
|
@ -7,7 +7,7 @@ foreach my $conf (qw!zabbix_agentd.conf zabbix_agentd.conf.d/asterisk.conf
|
|||
zabbix_agentd.conf.d/deprecated_cpunum.conf zabbix_agentd.conf.d/deprecated_memory.conf
|
||||
zabbix_agentd.conf.d/deprecated_netstat.conf zabbix_agentd.conf.d/deprecated_swap.conf
|
||||
zabbix_agentd.conf.d/extip.conf zabbix_agentd.conf.d/mail.conf zabbix_agentd.conf.d/mysql.conf
|
||||
zabbix_agentd.conf.d/phpki_certs.conf zabbix_agentd.conf.d/samba.conf!){
|
||||
zabbix_agentd.conf.d/phpki_certs.conf zabbix_agentd.conf.d/samba.conf zabbix_agentd.conf.d/block_devices.conf!){
|
||||
templates2events("/etc/zabbix/$conf", qw(zabbix-agent-update bootstrap-console-save));
|
||||
}
|
||||
templates2events("/etc/sudoers", "zabbix-agent-update");
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
$OUT = '';
|
||||
qx(zabbix_agentd -t vfs.dev.discovery -c /dev/null | grep -q ZBX_NOTSUPPORTED);
|
||||
if ($? != 0){
|
||||
$OUT .= '# vfs.dev.discovery is natively supported, not UserParameter needed';
|
||||
} else{
|
||||
$OUT .=<<'_EOF';
|
||||
# Discover block devices
|
||||
UserParameter=vfs.dev.discovery,/var/lib/zabbix/bin/disco_block_devices
|
||||
_EOF
|
||||
}
|
||||
}
|
||||
|
|
@ -26,17 +26,18 @@ my $what = $ARGV[0] || '';
|
|||
# This is the list of plugins we can get stats for
|
||||
# you can set the regex used to identify a line in the logs
|
||||
my %denied = (
|
||||
dnsbl => qr{dnsbl\s+90},
|
||||
dnsbl => qr{(dnsbl\s+90|naughty\s+90\d\s+\(dnsbl\))},
|
||||
rhsbl => qr{rhsbl\s+90},
|
||||
uribl => qr{uribl\s+90},
|
||||
clamav => qr{virus::clam(av|dscan)\s+90},
|
||||
check_earlytalker => qr{(check_)?earlytalker\s+90},
|
||||
check_basicheaders => qr{(check_basic)?headers\s+90},
|
||||
check_goodrcptto => qr{(check_)?goodrcptto\s+90},
|
||||
check_spamhelo => qr{(check_spam)?helo\s+90},
|
||||
check_spamhelo => qr{((check_spam)?helo\s+90|naughty\s+90\d\s+\(helo\))},
|
||||
fcrdns => qr{fcrdns\s+90},
|
||||
karma => qr{karma\s+90},
|
||||
spf => qr{sender_permitted_from\s+90},
|
||||
karma => qr{(karma\s+90|naughty\s+90\d\s+\(karma\))},
|
||||
spf => qr{(sender_permitted_from|spf_deny)\s+90},
|
||||
dmarc => qr{dmarc\s+90},
|
||||
tls_failed => qr{tls\s+90},
|
||||
resolvable_fromhost => qr{(require_)?resolvable_fromhost}
|
||||
);
|
||||
|
@ -86,8 +87,8 @@ while (<STDIN>) {
|
|||
next;
|
||||
}
|
||||
|
||||
# Queued, not tagged as spam, those are the clean emails
|
||||
elsif ($line =~ m/queued\s+<.*>\s+No,\s+(score|hits)=/){
|
||||
# Queued, not tagged as spam (or spam filtering disabled), those are the clean emails
|
||||
elsif ($line =~ m/queued\s+<.*>(\s+No,\s+(score|hits)=.+)?/){
|
||||
$cnt{queued}++;
|
||||
next;
|
||||
}
|
||||
|
|
|
@ -1,23 +1,31 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
use Mail::Send;
|
||||
use esmith::ConfigDB;
|
||||
use MIME::Lite;
|
||||
use Net::SMTP;
|
||||
|
||||
my $c = esmith::ConfigDB->open_ro();
|
||||
my $c = esmith::ConfigDB->open_ro();
|
||||
my $domain = $c->get('DomainName')->value();
|
||||
my $host = $c->get('SystemName')->value();
|
||||
my $z = $c->get('zabbix-agent');
|
||||
my $dest = $z->prop('StatusRecipient') || 'admin@' . $domain;
|
||||
my $host = $c->get('SystemName')->value();
|
||||
my $z = $c->get('zabbix-agent');
|
||||
my $dest = $z->prop('StatusRecipient') || 'admin@' . $domain;
|
||||
|
||||
my $mail = new Mail::Send;
|
||||
$mail->to("$dest");
|
||||
$mail->set("From","zabbix-agent");
|
||||
$mail->subject("[STATUS] $host.$domain");
|
||||
my $body = $mail->open;
|
||||
print $body localtime(time)."\n",
|
||||
"\n#>tail /var/log/messages :\n",
|
||||
`/usr/bin/tail \$(readlink /var/log/messages)`,
|
||||
"\n#>netstat --numeric-hosts -tpu :\n",
|
||||
`/bin/netstat --numeric-hosts -tpu`;
|
||||
$body->close;
|
||||
my $smtp = Net::SMTP->new('localhost');
|
||||
my $mail = MIME::Lite->new(
|
||||
From => 'smeserver-status@' . $domain,
|
||||
To => $dest,
|
||||
Subject => "[STATUS] $host.$domain",
|
||||
Data => localtime(time)."\n" .
|
||||
"\n#>tail /var/log/messages :\n" .
|
||||
`/usr/bin/tail \$(readlink /var/log/messages)` .
|
||||
"\n#>netstat --numeric-hosts -tpu :\n" .
|
||||
`/bin/netstat --numeric-hosts -tpu`
|
||||
);
|
||||
|
||||
$smtp->mail('smeserver-status@' . $domain);
|
||||
$smtp->recipient($dest);
|
||||
$smtp->data();
|
||||
$smtp->datasend($mail->as_string);
|
||||
$smtp->dataend();
|
||||
$smtp->quit;
|
||||
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
# $Id: smeserver-zabbix-agent.spec,v 1.34 2012/06/07 16:26:43 vip-ire Exp $
|
||||
# Authority: vip-ire
|
||||
# Name: Daniel Berteaud
|
||||
|
||||
%define name smeserver-zabbix-agent
|
||||
%define version 0.4.0
|
||||
%define release 1
|
||||
Summary: sme server integration of zabbix agent
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}%{?dist}
|
||||
Name: smeserver-zabbix-agent
|
||||
Version: 0.4.8
|
||||
Release: 1%{?dist}
|
||||
License: GNU GPL version 2
|
||||
URL: http://www.zabbix.com/
|
||||
Group: SMEserver/addon
|
||||
|
@ -34,6 +27,43 @@ Zabbix is an entreprise-class open source distributed monitoring
|
|||
solution
|
||||
|
||||
%changelog
|
||||
* Fri May 29 2020 Daniel Berteaud <daniel@firewall-services.com> 0.4.8-1
|
||||
- Adapt regex to match queued emails when spam filtering is disabled
|
||||
(daniel@firewall-services.com)
|
||||
|
||||
* Thu Feb 27 2020 Daniel Berteaud <daniel@firewall-services.com> 0.4.7-1
|
||||
- Rewrite util_send_status_mail to go through the SMTP server (daniel@firewall-
|
||||
services.com)
|
||||
- Remove useless var in spec file (daniel@firewall-services.com)
|
||||
|
||||
* Wed Nov 27 2019 Daniel Berteaud <daniel@firewall-services.com> 0.4.6-1
|
||||
- Remove the git CHANGELOG as it's not generated anymore (daniel@firewall-
|
||||
services.com)
|
||||
|
||||
* Wed Nov 27 2019 Daniel Berteaud <daniel@firewall-services.com> 0.4.5-1
|
||||
- Adapt spec file for tito (daniel@firewall-services.com)
|
||||
- Detect if running >= 4.4, and remove vfs.dev.discovery UserParameter in this
|
||||
case (daniel@firewall-services.com)
|
||||
|
||||
* Wed Nov 27 2019 Daniel Berteaud <daniel@firewall-services.com>
|
||||
- Detect if running >= 4.4, and remove vfs.dev.discovery UserParameter in this
|
||||
case (daniel@firewall-services.com)
|
||||
|
||||
* Tue Nov 26 2019 Daniel Berteaud <daniel@firewall-services.com> 0.4.3-1
|
||||
- new package built with tito
|
||||
|
||||
* Tue May 3 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.4.3-1.sme
|
||||
- Add dmarc regex in util_parse_mail_in and add support for spf_deny plugin
|
||||
|
||||
* Wed Apr 27 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.4.2-1.sme
|
||||
- Adapt qpsmtpd parser regex to match naughty rejects against the original
|
||||
plugin
|
||||
|
||||
* Tue Apr 19 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.4.1-1.sme
|
||||
- Adapt util_parse_mail_in and util_count_mail_in to work with qpsmtpd 0.96
|
||||
- Define %clean before %files so epel-macros don't try to add a default
|
||||
buggy %clean on el5
|
||||
|
||||
* Mon Mar 21 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.4.0-1.sme
|
||||
- Add support for new encryption features of zabbix 3.0
|
||||
|
||||
|
@ -292,14 +322,12 @@ rm -f %{name}-%{version}-filelist
|
|||
--file /var/lib/zabbix/bin/check_certs_sudo 'attr(0750,root,zabbix)' \
|
||||
--dir /var/lib/zabbix/tmp 'attr(0750,zabbix,zabbix)' \
|
||||
> %{name}-%{version}-filelist
|
||||
echo "%doc CHANGELOG.git" >> %{name}-%{version}-filelist
|
||||
|
||||
%files -f %{name}-%{version}-filelist
|
||||
%defattr(-,root,root)
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f %{name}-%{version}-filelist
|
||||
%defattr(-,root,root)
|
||||
|
||||
%postun
|
||||
#uninstall
|
||||
|
|
Loading…
Reference in New Issue