Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
# 1.2.32
# CHANGES

## 1.2.43 (May 11, 2023)

* [TECH] Bump version to `1.2.43`.
* [HOTFIX] Fix Windows 11 version detection.
* [HOTFIX] Fix plugins directory location on Windows.
* Add reboot check.
* Ping plugin Windows compatibility fixes:
* handle newer Windows behavior with additional fallback logic.
* improve parsing for non-English OS output where `"Average"` differs.
* Source commits include: `c0a0370`, `af9f0ba`, `17e7c52`, `4033b2a`, `49dfa0a`, `55ef514`.

## 1.2.42 (Apr 24/25, 2023)

* [TECH] Bump version to `1.2.42`.
* [HOTFIX] Remove unused variable declaration.
* Add/extend monitoring plugins and integrations:
* BitNinja monitoring plugin.
* Plesk Cgroups Manager plugin updates.
* Fail2ban monitoring.
* BIND monitoring.
* Bird monitoring.
* Users monitoring.
* Postfix MTA plugin.
* Dovecot plugin.
* ProFTP plugin (initially added as `ftp.py`, then renamed to `proftp.py`).
* Plugin fixes:
* `mdstat`: remove `sudo`.
* `dirsize`: change to collect total size.
* Miscellaneous fixes:
* configuration variable additions.
* URL / broken-link fixes.
* general maintenance and merge syncs from upstream PRs.

## 1.2.32

* [*] Updated the installation instructions.
41 changes: 18 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
# Agent360

360 Monitoring ([360monitoring.com](https://360monitoring.com)) is a web service that monitors and displays statistics of
your server performance.
360 Monitoring ([360monitoring.com](https://360monitoring.com)) is a web service that monitors and displays your server performance statistics.

Agent360 is OS agnostic software compatible with Python 3.7 and 3.8.
It's been optimized to have low CPU consumption and comes with an
extendable set of useful plugins.
Agent360 is OS-agnostic software compatible with Python 3.7 and 3.8.
It is optimized for low CPU usage and includes an extendable set of useful plugins.

[![Build Status](https://github.com/plesk/agent360/workflows/Agent360-Test-And-Deploy/badge.svg?branch=master)](https://github.com/plesk/agent360/actions/workflows/test-and-deploy.yml)

## Documentation

You can find the full documentation including the feature complete REST API at [docs.360monitoring.com](https://docs.360monitoring.com/docs) and [docs.360monitoring.com/docs/api](https://docs.360monitoring.com/docs/api).
You can find the full documentation, including the feature-complete REST API, at [docs.360monitoring.com](https://docs.360monitoring.com/docs) and [docs.360monitoring.com/docs/api](https://docs.360monitoring.com/docs/api).

## Automatic Installation (All Linux Distributions)

You can install the default configuration of Agent360 on all Linux distributions with just one click.
You can install Agent360 with the default configuration on all Linux distributions with a single command.

1. Connect to your server via SSH.

2. Find your USERTOKEN. To do so, [go to the servers page](https://monitoring.platform360.io/servers/overview) and then click the "Add server" button.

2. Find your USERTOKEN. To do so, [go to the servers page](https://monitoring.platform360.io/servers/overview) and click the Add server button.
3. Run the following command:

```sh
Expand All @@ -29,16 +25,16 @@ You can install the default configuration of Agent360 on all Linux distributions

## Automatic Installation (Windows)

Download the [setup](https://github.com/plesk/agent360/releases) and install it on your Windows server.
Download the [installer](https://github.com/plesk/agent360/releases) and install it on your Windows server.

The installer will ask for your USERTOKEN which you can get [from the servers page](https://monitoring.platform360.io/servers/overview).
The installer will ask for your USERTOKEN, which you can get [from the servers page](https://monitoring.platform360.io/servers/overview).

## Manual Installation

To customize installation options, install Agent360 manually.

1. Connect to your server via SSH.
2. Run the following command, which differs depending on your server platform:
2. Run the following command for your server platform:

- Debian GNU/Linux:

Expand All @@ -48,31 +44,30 @@ To customize installation options, install Agent360 manually.
wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini
```

- Fedora/CentOS version 6 or earlier (python 2.7):
- Fedora/CentOS version 6 or earlier (Python 2.7):

```sh
yum install python-devel python-setuptools gcc
easy_install agent360 netifaces psutil
wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini
```

- Fedora/CentOS version 7 and later (python 3):
- Fedora/CentOS version 7 and later (Python 3):

```sh
yum install python36-devel python36 gcc
pip3 install agent360
wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini
```

3. Find your USERTOKEN. To do so, [go to the servers page](https://monitoring.platform360.io/servers/overview) and then click the "Add server" button. You need this to generate a serverid.

4. Run the following command (USERTOKEN is the one you got during the previous step):
3. Find your USERTOKEN. To do so, [go to the servers page](https://monitoring.platform360.io/servers/overview) and click the Add server button. You need this to generate a server ID.
4. Run the following command (USERTOKEN is the value from the previous step):

```sh
agent360 hello USERTOKEN /etc/agent360-token.ini
```

5. Create a systemd service at `/etc/systemd/system/agent360.service` by adding the following:
5. Create a systemd service at [agent360.service](http://_vscodecontentref_/0) with the following content:

```ini
[Unit]
Expand All @@ -86,7 +81,7 @@ To customize installation options, install Agent360 manually.
WantedBy=multi-user.target
```

6. Run the following command:
6. Run the following commands:

```sh
chmod 644 /etc/systemd/system/agent360.service
Expand All @@ -95,8 +90,8 @@ To customize installation options, install Agent360 manually.
systemctl start agent360
```

## Building Windows setup
## Building Windows Setup

Prerequisite: [InnoSetup](https://jrsoftware.org/isdl.php) is used as the installer, build script assumes that it is installed in the default location.
Prerequisite: [Inno Setup](https://jrsoftware.org/isdl.php) is used as the installer. The build script assumes it is installed in the default location.

Run `php windows/build.php` to create setup file.
Run `php windows/build.php` to create the setup file.
12 changes: 6 additions & 6 deletions agent360/agent360.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class Agent:

def __init__(self, dry_instance=False):
'''
Initialize internal strictures
Initialize internal structures
'''
self._config_init()

Expand Down Expand Up @@ -371,15 +371,15 @@ def _config_init(self):

def _config_section_create(self, section):
'''
Create an addition section in the configuration object
if it's not exists
Create an additional section in the configuration object
if it does not exist
'''
if not self.config.has_section(section):
self.config.add_section(section)

def _logging_init(self):
'''
Initialize logging faculty
Initialize logging facility
'''
level = self.config.getint('agent', 'logging_level')

Expand Down Expand Up @@ -687,7 +687,7 @@ def _get_plugins(self, state='enabled'):

def _rip(self):
'''
Join with dead workers
Join dead workers
Workaround for https://bugs.python.org/issue37788
'''
logging.debug('cemetery:%i', self.cemetery.qsize())
Expand Down Expand Up @@ -739,7 +739,7 @@ def run(self):
thread.start()
logging.debug('new_execution_worker_thread:%s', thread)
except Exception as e:
logging.warning('Can not start new thread: %s', e)
logging.warning('Cannot start new thread: %s', e)
else:
logging.warning('threads_capped')
self.metrics.put({
Expand Down
Loading