Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b81a6d1237 | ||
|
85fb39af13 | ||
|
905bfdce90 | ||
|
972ef40482 | ||
|
437332781d | ||
|
fbc8f88ae0 | ||
|
8206e8796e | ||
|
3e23c01d30 | ||
|
ca89c3027d | ||
|
e9f44d8d03 | ||
|
4cd1050cfc | ||
|
1dedbd22bf | ||
|
7bdf91d788 | ||
|
b684b4db0a |
3
.tito/packages/.readme
Normal file
3
.tito/packages/.readme
Normal file
|
@ -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.
|
1
.tito/packages/smeserver-zabbix-agent
Normal file
1
.tito/packages/smeserver-zabbix-agent
Normal file
|
@ -0,0 +1 @@
|
|||
0.4.8-1 ./
|
1
.tito/releasers.conf
Symbolic link
1
.tito/releasers.conf
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../tito_libs/releasers.conf
|
6
.tito/tito.props
Normal file
6
.tito/tito.props
Normal file
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
@ -87,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,7 +1,8 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
use Mail::Send;
|
||||
use esmith::ConfigDB;
|
||||
use MIME::Lite;
|
||||
use Net::SMTP;
|
||||
|
||||
my $c = esmith::ConfigDB->open_ro();
|
||||
my $domain = $c->get('DomainName')->value();
|
||||
|
@ -9,15 +10,22 @@ 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.2
|
||||
%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,34 @@ 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
|
||||
|
@ -301,7 +322,6 @@ 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
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
|
Loading…
Reference in New Issue
Block a user