Skip to content

Commit 9a8f4ec

Browse files
authored
release
1 parent dcd35ea commit 9a8f4ec

File tree

2 files changed

+620
-0
lines changed

2 files changed

+620
-0
lines changed

ReadMe.md

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# Check AirOs
2+
<img src="https://img.shields.io/badge/Code-Bash-orange?style=flat-square&logo=GNU%20Bash&logoColor=orange" alt="Bash"> <img src="https://img.shields.io/badge/Device-AirOs-0559C9?style=flat-square&logo=Ubiquiti" alt="Checked Device"> <img src="https://img.shields.io/badge/Release-v1.0-green?style=flat-square" alt="Release">
3+
4+
<img src="https://img.shields.io/badge/Dev by-Kalarumeth-blueviolet?style=flat-square" alt="Dev"> <img src="https://img.shields.io/badge/License-MIT-blue?style=flat-square" alt="MIT License">
5+
6+
The following script is used to monitor and display the basic information of Ubiquity AirOs 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.
7+
8+
**Important**: *snmpwalk command is required for script to run correctly*
9+
10+
11+
# Update Note
12+
13+
## 1.0 - Release
14+
15+
+ Release
16+
17+
# Installation
18+
19+
1. Download the script and give it privilages for run
20+
```
21+
curl -LJO https://raw.githubusercontent.com/Kalarumeth/Monitoring-AirOs/main/check_airos.sh
22+
```
23+
24+
2. Move to Icinga Plugin Dir
25+
```
26+
Default location: /usr/lib/nagios/plugins
27+
```
28+
29+
3. Add command to Icinga
30+
```
31+
object CheckCommand "check_airos" {
32+
import "plugin-check-command"
33+
command = [ PluginDir + "/check_airos.sh" ]
34+
arguments += {
35+
"-c" = {
36+
order = 0
37+
value = "$snmp_community$"
38+
}
39+
"-cr" = {
40+
order = 3
41+
value = "$crit$"
42+
}
43+
"-h" = {
44+
order = 1
45+
required = true
46+
value = "$address$"
47+
}
48+
"-t" = {
49+
order = 4
50+
required = true
51+
value = "$airos_type$"
52+
}
53+
"-wa" = {
54+
order = 2
55+
value = "$warn$"
56+
}
57+
}
58+
}
59+
```
60+
61+
# Functions
62+
63+
The Script is designed to monitor the following functions:
64+
65+
- **[airmax] AirMax:**
66+
Show all airMax Statistics of device
67+
```
68+
AirMax Information
69+
Enabled: On
70+
Quality: 96 %
71+
Capacity: 45 %
72+
Priority: None
73+
NoAck: Off
74+
```
75+
76+
- **[info] Info:**
77+
Show basic information
78+
```
79+
Device Information
80+
Location: OUTSIDE
81+
UpTime: 2 days, 18:03:25.00
82+
LastChange: 17:01:14.00
83+
Ubiquiti Networks, Inc. LiteBeam M5
84+
airOs Ver: XW.ar934x.v6.3.6.33330.210818.1930
85+
```
86+
87+
- **[radio] Radio:**
88+
Show status and statistics of radio
89+
```
90+
Radio Information
91+
Mode: AP Wireless Distribution System
92+
Country: 380
93+
Frequency: 5185
94+
DFS: Off
95+
TxPower: 0
96+
Distance: 0
97+
Chainmask: 1
98+
Antenna: 11x14 - 23 dBi
99+
```
100+
101+
- **[ram] Ram:**
102+
Show ram usage
103+
```
104+
OK! RAM used: 25.27 / 62.14 Mb (40.67%)
105+
RAM free: 36.86 Mb (59.33%)
106+
Buffer: 2.99 Mb
107+
Cache: 0 Kb
108+
```
109+
110+
- **[station] Station:**
111+
Show station information, work only on station setup
112+
```
113+
Station Information
114+
Name: AP041
115+
Signal: -41 dBm
116+
Noise floor: -100
117+
CCQ: 99 %
118+
Con. Time: 2
119+
TX/RX Rate: 150 MB / 150 MB
120+
TX/RX Bytes: 3.39 GB / 7.88 GB
121+
```
122+
123+
- **[wireless] Wireless:**
124+
Show wireless information
125+
```
126+
Wireless Information
127+
SSID: Bridge
128+
Hide: On
129+
Signal: -42 dBm
130+
RSSI: 54 dBm
131+
CCQ: 99
132+
Noise floor: -99
133+
TX/RX Rate: 150 MB / 150 MB
134+
Security: WPA2
135+
WDS: On
136+
Ap Repeater: Off
137+
Channel Width: 40
138+
Station Count: 1
139+
```
140+
141+
# How it work
142+
143+
Method to compose the execution string:
144+
145+
./check_airos.sh -c <SNMP community> -h <host> [-wa <value> -cr <value>] -t <object>
146+
147+
### OPTIONS:
148+
149+
```
150+
-c --community SNMP v2 community string with Read access.
151+
Default is: public.
152+
-h --host [REQUIRED OPTION] Host name or IP address to check.
153+
Default is: localhost.
154+
-wa --allert-wa Defines the threshold for Warning.
155+
Default is: 75.
156+
-cr --allert-cr Defines the threshold for Critical.
157+
Default is: 50.
158+
-t --type [REQUIRED OPTION] Field for select element to check on WatchGuard Device.
159+
{ airmax | info | radio | ram | station | wireless }.
160+
-H --help Show script help.
161+
-V --version Show script version.
162+
```
163+
164+
# Credits
165+
166+
### Author
167+
168+
Kalarumeth - https://github.com/Kalarumeth
169+
170+
### License
171+
172+
MIT License - Copyright 2022 Kalarumeth

0 commit comments

Comments
 (0)