net-analyzer/check_fortigate: initial commit
This commit is contained in:
parent
e470f218b5
commit
ef582ca39b
|
@ -0,0 +1,19 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=7
|
||||
|
||||
DIST_AUTHOR=JKEENAN
|
||||
DIST_VERSION=0.53
|
||||
inherit perl-module
|
||||
|
||||
DESCRIPTION="Manipulation of electronic mail addresses"
|
||||
HOMEPAGE="http://search.cpan.org/~jkeenan/List-Compare/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc x86"
|
||||
IUSE=""
|
||||
|
||||
SRC_TEST=do
|
|
@ -0,0 +1 @@
|
|||
DIST List-Compare-0.53.tar.gz 88437 BLAKE2B c7a1dec22ea140d101ccd8283056a918face57b19b2ac53b39a705ecf11fd16bec696ed8579d9cf14a64f3f20d97462d901966b0e99fecd75377b0f8cab45ab2 SHA512 b467e9395afa8297f5f59d745d22048373cfd60dc0c8ce56d0ad95e8f9fddcda487d99c906b9fb5ac1b28aa53873a7c9689347866c3aa907aecd31b4a127627a
|
|
@ -0,0 +1,14 @@
|
|||
BDEPEND=dev-lang/perl
|
||||
DEFINED_PHASES=compile configure install prepare test
|
||||
DEPEND=dev-lang/perl
|
||||
DESCRIPTION=Manipulation of electronic mail addresses
|
||||
EAPI=7
|
||||
HOMEPAGE=http://search.cpan.org/~jkeenan/List-Compare/
|
||||
INHERIT=perl-module
|
||||
KEYWORDS=amd64 ppc x86
|
||||
LICENSE=GPL-2
|
||||
RDEPEND=dev-lang/perl:=
|
||||
SLOT=0
|
||||
SRC_URI=mirror://cpan/authors/id/J/JK/JKEENAN/List-Compare-0.53.tar.gz
|
||||
_eclasses_=multiprocessing 61c959fc55c15c00bbb1079d6a71370b perl-functions fea344a91ebf37efadf172c6a3de5a72 perl-module 0ee2b2b92175720c966a5608c62b458d
|
||||
_md5_=1003ee4ac30d9956f35b048977ab34f3
|
|
@ -0,0 +1,13 @@
|
|||
BDEPEND=>=dev-vcs/git-1.8.2.1[curl]
|
||||
DEFINED_PHASES=install unpack
|
||||
DEPEND=dev-perl/List-Compare
|
||||
DESCRIPTION=A nagios plugin for checking Fortigate
|
||||
EAPI=7
|
||||
HOMEPAGE=https://github.com/riskersen/Monitoring
|
||||
INHERIT=git-r3
|
||||
KEYWORDS=amd64 x86
|
||||
LICENSE=GPL-2+
|
||||
PROPERTIES=live
|
||||
SLOT=0
|
||||
_eclasses_=git-r3 cc875b0c1e9b3bdac1af0f82f3ba29da
|
||||
_md5_=a46c5c3b25750ddf40c3b1718f79790d
|
|
@ -0,0 +1,29 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit git-r3
|
||||
|
||||
DESCRIPTION="A nagios plugin for checking Fortigate"
|
||||
HOMEPAGE="https://github.com/riskersen/Monitoring"
|
||||
EGIT_REPO_URI="https://github.com/riskersen/Monitoring.git"
|
||||
EGIT_COMMIT="b52bc4034649c9f7002aff4f90ad0850d285c665"
|
||||
|
||||
DEPEND="dev-perl/List-Compare"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE=""
|
||||
|
||||
src_install(){
|
||||
default
|
||||
exeinto /usr/lib64/nagios/plugins/contrib/
|
||||
doexe fortigate/check_fortigate.pl
|
||||
insinto /usr/share/snmp/mibs/
|
||||
newins fortigate/FortiADC_mibs FORTIADC-MIB.txt
|
||||
|
||||
insinto /usr/share/icinga2/include/plugins-contrib.d/
|
||||
doins ${FILESDIR}/${PN}.conf
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
object CheckCommand "fortinet" {
|
||||
import "ipv4-or-ipv6"
|
||||
command = [ PluginDir + "/contrib/check_fortigate.pl" ]
|
||||
|
||||
arguments = {
|
||||
"-H" = {
|
||||
value = "$fortinet_address$"
|
||||
required = true
|
||||
}
|
||||
"-C" = "$fortinet_community$"
|
||||
"-v" = "$fortinet_snmpversion$"
|
||||
"-T" = {
|
||||
value = "$fortinet_check$"
|
||||
description = "CPU, network, Memory, Cluster, Sessions, VPN, Disk-Space. Consult help output if more info needed!"
|
||||
}
|
||||
"-U" = {
|
||||
value = "$fortinet_snmpv3user$"
|
||||
description = "SNMPv3 Auth user"
|
||||
}
|
||||
"-A" = {
|
||||
value = "$fortinet_snmpv3authpass$"
|
||||
description = "SNMPv3 Auth password"
|
||||
}
|
||||
"-a" = {
|
||||
value = "$fortinet_snmpv3authprot$"
|
||||
description = "SNMPv3 Auth protocol (defaults to SHA)"
|
||||
}
|
||||
"-X" = {
|
||||
value = "$fortinet_snmpv3privpass$"
|
||||
description = "SNMPv3 Priv password"
|
||||
}
|
||||
"-x" = {
|
||||
value = "$fortinet_snmpv3privprot$"
|
||||
description = "SNMPv3 Priv protocol (defaults to AES)"
|
||||
}
|
||||
"-S" = {
|
||||
value = "$fortinet_serial$"
|
||||
description = "Serial number for identification of primary master"
|
||||
}
|
||||
"-s" = {
|
||||
set_if = "$fortinet_slave$"
|
||||
description = "Check on slave OIDs, please use dedicated mgmt interface or SNMP community by appending serial number to community"
|
||||
}
|
||||
"-w" = {
|
||||
value = "$fortinet_warn$"
|
||||
description = "Warning threshold, applies to cpu, mem, session, fazcpu, fazmem, fazdisk"
|
||||
}
|
||||
"-c" = {
|
||||
value = "$fortinet_crit$"
|
||||
description = "Critical threshold, applies to cpu, mem, session, fazcpu, fazmem, fazdisk"
|
||||
}
|
||||
"-n" = {
|
||||
set_if = "$fortinet_nosync$"
|
||||
description = "Exclude cluster synchronisation check (cluster only)"
|
||||
}
|
||||
"-M" = {
|
||||
value = "$fortinet_vpnoutput$"
|
||||
description = "Output-Mode: 0 => just print, 1 => print and show failed tunnel, 2 => critical"
|
||||
}
|
||||
"-V" = {
|
||||
value = "$fortinet_vpnmode$"
|
||||
description = "VPN-Mode: both => IPSec & SSL/OpenVPN, ipsec => IPSec only, ssl => SSL/OpenVPN only"
|
||||
}
|
||||
"-W" = {
|
||||
value = "$fortinet_vpnwhitelist$"
|
||||
description = "Include only entries matching a regular expression (applies before --blacklist) / IPSEC only"
|
||||
}
|
||||
"-B" = {
|
||||
value = "$fortinet_vpnblacklist$"
|
||||
description = "Exclude entries matching a regular expression (applies after --whitelist) / IPSEC only"
|
||||
}
|
||||
"-p" = {
|
||||
value = "$fortinet_filehelper$"
|
||||
description = "Path to store helper files"
|
||||
}
|
||||
}
|
||||
|
||||
vars.fortinet_address = "$check_address$"
|
||||
vars.fortinet_filehelper = "$TEMPPATH$"
|
||||
vars.fortinet_warn = "75"
|
||||
vars.fortinet_crit = "90"
|
||||
vars.fortinet_community = "public"
|
||||
vars.fortinet_snmpversion = "2"
|
||||
}
|
||||
|
Loading…
Reference in New Issue