Code backup
This commit is contained in:
2026-05-10 16:59:01 +02:00
commit 368d6fafea
796 changed files with 315310 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
Copyright 2022 Kalarumeth - https://github.com/Kalarumeth
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+99
View File
@@ -0,0 +1,99 @@
CD-SNMP-MIB::memTotalReal.0 = INTEGER: 457656 kB 1.3.6.1.4.1.2021.4.5 RAM TOT
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 332428 kB 1.3.6.1.4.1.2021.4.11 RAM FREE
UCD-SNMP-MIB::ssCpuSystem.0 = INTEGER: 27 1.3.6.1.4.1.2021.11.10 CPU LOAD
UCD-SNMP-MIB::snmperrErrorFlag.0 = INTEGER: noError(0) 1.3.6.1.4.1.2021.101.100
UCD-SNMP-MIB::snmperrErrMessage.0 = STRING: 1.3.6.1.4.1.2021.101.101
1.3.6.1.4.1.21317.1.3.1.2
SNMPv2-SMI::enterprises.21317.1.3.1.2.1 = STRING: "51.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.2 = STRING: "24.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.3 = STRING: "34.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.6 = STRING: "23.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.7 = STRING: "27.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.8 = STRING: "41.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.9 = STRING: "35.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.10 = STRING: "31.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.11 = STRING: "31.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.12 = STRING: "26.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.13 = STRING: "10080.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.14 = STRING: "10080.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.15 = STRING: "10220.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.16 = STRING: "10080.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.17 = STRING: "10080.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.18 = STRING: "10080.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.19 = STRING: "11.920"
SNMPv2-SMI::enterprises.21317.1.3.1.2.20 = STRING: "5.020"
SNMPv2-SMI::enterprises.21317.1.3.1.2.21 = STRING: "3.361"
SNMPv2-SMI::enterprises.21317.1.3.1.2.22 = STRING: "4.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.23 = STRING: "1.300"
SNMPv2-SMI::enterprises.21317.1.3.1.2.24 = STRING: "1.219"
SNMPv2-SMI::enterprises.21317.1.3.1.2.25 = STRING: "1.235"
SNMPv2-SMI::enterprises.21317.1.3.1.2.26 = STRING: "5.129"
SNMPv2-SMI::enterprises.21317.1.3.1.2.27 = STRING: "3.310"
SNMPv2-SMI::enterprises.21317.1.3.1.2.28 = STRING: "0.855"
SNMPv2-SMI::enterprises.21317.1.3.1.2.29 = STRING: "0.893"
SNMPv2-SMI::enterprises.21317.1.3.1.2.30 = STRING: "0.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.31 = STRING: "1.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.32 = STRING: "1.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.33 = STRING: "51.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.34 = STRING: "46.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.36 = STRING: "58.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.37 = STRING: "19.000"
SNMPv2-SMI::enterprises.21317.1.3.1.2.38 = STRING: "1.000"
1.3.6.1.4.1.21317.1.3.1.13
SNMPv2-SMI::enterprises.21317.1.3.1.13.1 = STRING: "CPU Temp"
SNMPv2-SMI::enterprises.21317.1.3.1.13.2 = STRING: "System Temp"
SNMPv2-SMI::enterprises.21317.1.3.1.13.3 = STRING: "Peripheral Temp"
SNMPv2-SMI::enterprises.21317.1.3.1.13.6 = STRING: "NIC Temp"
SNMPv2-SMI::enterprises.21317.1.3.1.13.7 = STRING: "VRMCpu Temp"
SNMPv2-SMI::enterprises.21317.1.3.1.13.8 = STRING: "VRMSoc Temp"
SNMPv2-SMI::enterprises.21317.1.3.1.13.9 = STRING: "VRMABCD Temp"
SNMPv2-SMI::enterprises.21317.1.3.1.13.10 = STRING: "VRMEFGH Temp"
SNMPv2-SMI::enterprises.21317.1.3.1.13.11 = STRING: "DIMMABCD Temp"
SNMPv2-SMI::enterprises.21317.1.3.1.13.12 = STRING: "DIMMEFGH Temp"
SNMPv2-SMI::enterprises.21317.1.3.1.13.13 = STRING: "FAN1"
SNMPv2-SMI::enterprises.21317.1.3.1.13.14 = STRING: "FAN2"
SNMPv2-SMI::enterprises.21317.1.3.1.13.15 = STRING: "FAN3"
SNMPv2-SMI::enterprises.21317.1.3.1.13.16 = STRING: "FAN4"
SNMPv2-SMI::enterprises.21317.1.3.1.13.17 = STRING: "FAN5"
SNMPv2-SMI::enterprises.21317.1.3.1.13.18 = STRING: "FAN6"
SNMPv2-SMI::enterprises.21317.1.3.1.13.19 = STRING: "12V"
SNMPv2-SMI::enterprises.21317.1.3.1.13.20 = STRING: "5VCC"
SNMPv2-SMI::enterprises.21317.1.3.1.13.21 = STRING: "3.3VCC"
SNMPv2-SMI::enterprises.21317.1.3.1.13.22 = STRING: "VBAT"
SNMPv2-SMI::enterprises.21317.1.3.1.13.23 = STRING: "VDDCR"
SNMPv2-SMI::enterprises.21317.1.3.1.13.24 = STRING: "VMEMABCD"
SNMPv2-SMI::enterprises.21317.1.3.1.13.25 = STRING: "VMEMEFGH"
SNMPv2-SMI::enterprises.21317.1.3.1.13.26 = STRING: "VDD_5_DUAL"
SNMPv2-SMI::enterprises.21317.1.3.1.13.27 = STRING: "VDD_33_DUAL"
SNMPv2-SMI::enterprises.21317.1.3.1.13.28 = STRING: "SOCRUN"
SNMPv2-SMI::enterprises.21317.1.3.1.13.29 = STRING: "SOCDUAL"
SNMPv2-SMI::enterprises.21317.1.3.1.13.30 = STRING: "Chassis Intru"
SNMPv2-SMI::enterprises.21317.1.3.1.13.31 = STRING: "PS1 Status"
SNMPv2-SMI::enterprises.21317.1.3.1.13.32 = STRING: "PS2 Status"
SNMPv2-SMI::enterprises.21317.1.3.1.13.33 = STRING: "AOC_NIC2 Temp "
SNMPv2-SMI::enterprises.21317.1.3.1.13.34 = STRING: "AOC_NIC1 Temp "
SNMPv2-SMI::enterprises.21317.1.3.1.13.36 = STRING: "AOC_SAS1 Temp "
SNMPv2-SMI::enterprises.21317.1.3.1.13.37 = STRING: "HDD Temp "
SNMPv2-SMI::enterprises.21317.1.3.1.13.38 = STRING: "HDD Status "
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+140
View File
@@ -0,0 +1,140 @@
# Check WatchGuard
<img src="https://img.shields.io/badge/Dev by-Kalarumeth-blueviolet?style=flat-square" alt="Dev"> <img src="https://img.shields.io/badge/Code-Bash-orange?style=flat-square&logo=GNU Bash&logoColor=orange" alt="Bash"> <img src="https://img.shields.io/badge/License-MIT-blue?style=flat-square" alt="MIT License">
The following script is used to monitor the basic functions of the WatchGuard firewall via snmpwalk scripts and are processed to provide easy-to-read data. It can be run separately or integrated into Icinga2 as a monitoring plugin.
**Important**: *snmpwalk command is required for script to run correctly*
# Update Note
## 0.5 - Release
+Release
# Installation
1. Download the script and give it privilages for run
```
curl -LJO https://raw.githubusercontent.com/Kalarumeth/...
```
2. Move to Icinga Plugin Dir
```
Default location: /usr/lib/nagios/plugins
```
3. Add command to Icinga
```
object CheckCommand "check_watchguard" {
import "plugin-check-command"
command = [ PluginDir + "/check_watchguard.sh" ]
arguments += {
"-ac" = {
order = 4
value = "$watchguard_ac$"
}
"-c" = {
order = 0
required = true
value = "$snmp_community$"
}
"-cr" = {
order = 3
value = "$crit$"
}
"-h" = {
order = 1
required = true
value = "$address$"
}
"-t" = {
order = 5
required = true
value = "$watchguard_type$"
}
"-wa" = {
order = 2
value = "$warn$"
}
}
vars.snmp_community = "public"
}
```
# Functions
The Script is designed to monitor the following firewall functions:
- **[ac] ActiveConns:**
Active connections in use and total number of active connections;
```
OK! Active Connections used: 0.16%
Current Active Connections: 5.412 of 3.300.000
```
- **[cpu] Cpu:**
Cpu load;
```
OK! CPU used: 2%
```
- **[data] Transfer:**
Information of file size send and recive.
```
Send 1479 GB / Recive 1982 GB
WatchGuard transfer info:
Total Data Send: 1479 GB 1855886728 Pkg
Total Data Recive: 1982 GB 2466423320 Pkg
```
- **[info] Info:**
Information of Active VPN, Intrusion Prevention Service and Gateway Antivirus Service
```
VPN active: 7
Gateway Antivirus Service: gav_version:2022020
Last Update: Fri, Feb 04 2022 11:54:03 AM
Intrusion Prevention Service: ips_version:18.196
Last Update: Thu, Feb 03 2022 06:53:47 PM
```
- **[ram] Memory:**
Ram load;
```
OK! RAM used: 2,67 / 3,77 GB (71,00 %)
RAM free: 1,10 GB (29,13 %)
```
# How it work
Method to compose the execution string:
./check_watchguard.sh -c <SNMP community> -h <host> [-wa <value> -cr <value> -ac <value>] -t <object>
### OPTIONS:
```
-c --community SNMP v2 community string with Read access.
Default is: public.
-h --host [REQUIRED OPTION] Host name or IP address to check.
Default is: localhost.
-wa --allert-wa Defines the threshold for Warning.
Default is: 80.
-cr --allert-cr Defines the threshold for Critical.
Default is: 90.
-ac --activeconns Defines the threshold for Max ActiveConnection.
Default is: 3300000
-t --type [REQUIRED OPTION] Field for select element to check on WatchGuard Device.
{ ac | cpu | data | info | ram }.
-H --help Show script help.
-V --version Show script version.
```
# Credits
### Author
Kalarumeth - https://github.com/Kalarumeth
### License
MIT License - Copyright 2022 Kalarumeth
File diff suppressed because it is too large Load Diff