utils/check.business.ru_monitor/README.md

58 lines
2.3 KiB
Markdown
Raw Permalink Normal View History

2024-06-28 00:02:15 +03:00
# check.business.ru_monitor
## `check.business.ru_monitor`.py
**Description:**
> Print today's status summary.
**Dependencies:**
>
> * [Python 3](https://www.python.org/downloads/) (tested version 3.11.2 on [Debian GNU/Linux 12](http://ftp.debian.org/debian/dists/bookworm/))
> * [requests](https://pypi.org/project/requests/) Python 3 module (tested version 2.32.3)
| PARAMETERS | DESCRIPTION | DEFAULT|
|-------------|-------------|--------|
|**--app_id**|[https://check.business.ru/settings/integrations](https://check.business.ru/settings/integrations)|**REQUIRED**|
|**--secret**|[https://check.business.ru/settings/integrations](https://check.business.ru/settings/integrations)|**REQUIRED**|
|**[--json]**|print in json fromat|`None`|
### `Example usage without download`
```bash
# run with curl
python3 <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/check.business.ru_monitor/check.business.ru_monitor.py) --app_id APP_ID --secret SECRET
# run with wget
python3 <(wget -qO- https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/check.business.ru_monitor/check.business.ru_monitor.py) --app_id APP_ID --secret SECRET
```
### `Example usage in terminal`
```bash
# download
sudo wget https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/check.business.ru_monitor/check.business.ru_monitor.py -O /usr/local/bin/check.business.ru_monitor.py
sudo chmod +x /usr/local/bin/check.business.ru_monitor.py
# run
check.business.ru_monitor.py --app_id APP_ID --secret SECRET
```
### `Example usage in Zabbix`
```bash
# download
sudo wget https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/check.business.ru_monitor/check.business.ru_monitor.py -O /usr/lib/zabbix/externalscripts/check.business.ru_monitor.py
sudo chmod +x /usr/lib/zabbix/externalscripts/check.business.ru_monitor.py
```
`Zabbix Server` - `Configuration` - `Templates` - `Import` - [check.business.ru.yaml](https://git.hmp.today/pavel.muhortov/zabbix/src/branch/master/templates/applications/check.business.ru)
`Zabbix Server` - `Configuration` - `Hosts` - `"hostname"` - `Templates` - `check.business.ru`
`Zabbix Server` - `Configuration` - `Hosts` - `"hostname"` - `Macros` - `Inherited and host macros`
| MACRO | VALUE |
|-------|-----------------|
|{$APP_ID}| APP_ID |
|{$SECRET}| SECRET |