| Name | Last modified | Size | Description | |
|---|---|---|---|---|
| Parent Directory | - | |||
| README.pdf | 2018-02-27 15:37 | 64K | ||
| usm_observer.py | 2018-02-27 15:10 | 11K | ||
| README.html | 2018-02-27 15:35 | 3.8K | ||
| settings.ini | 2019-01-31 12:55 | 460 | ||
| settings.ini-example | 2017-10-05 18:33 | 434 | ||
| requirements.txt | 2017-10-05 18:33 | 7 | ||
| venv/ | 2025-08-21 00:44 | - | ||
usm_observer - external module for ERP USERSIDE. The module monitors various parameters of the active equipment using the SNMP protocol.
apt-get install python3
python3 -m ensurepip
or
apt-get install python3-pip
yum -y install yum-utils
yum -y groupinstall development
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum -y install python36u
yum -y install python36u-pip
Next, everywhere, instead of python3, you should use python3.6 and instead of pip3, you should use pip3.6.
pkg install python3
python3 -m ensurepip
unzip usm_observer-vX.X.X.zip
rm usm_observer-vX.X.X.zip
cd usm_observer
pip3 install --upgrade pip
pip3 install -r requirements.txt
cp settings.ini-example settings.ini
Run once the module manually:
python3 usm_observer.py
There should be no errors at startup either in the console or in the logs.
If there are errors, fix them and start them manually again.
If there are no errors, set to start automatically by the crontab.
Add to crontab this entry:
*/2 * * * * root python3 /path/to/module/usm_observer.py >> /var/log/userside/usm_observer_cron.log 2>>/var/log/userside/usm_observer_cron_error.log
Instead of the path /var/log/userside, enter your real log path as specified in the settings.ini.
Make sure that the module is started by the cron normally.
You may have to add a path to python3 in crontab file, or specify the full path instead of python3.
Use the logrotate service.
Create the file /etc/logrotate.d/userside, if it does not already exist, and add the following lines to it:
/var/log/userside/*.log {
rotate 7
daily
compress
delaycompress
missingok
notifempty
}
Use the newsyslog service.
Create the file /usr/local/etc/newsyslog.conf.d/userside, if it does not already exist, and add the following lines to it:
/var/log/userside/*.log 644 7 * @T00 GJC