Changeset View
Changeset View
Standalone View
Standalone View
net-mgmt/librenms/files/pkg-message.in
[ | [ | ||||
{ type: install | { type: install | ||||
message: <<EOM | message: <<EOM | ||||
NOTE: setting sql-mode="" is no longer required. You can remove | |||||
it from /usr/local/etc/mysql/my.cnf | |||||
You can mostly follow the guide at: | You can mostly follow the guide at: | ||||
http://docs.librenms.org/ | http://docs.librenms.org/ | ||||
with the following notes: | with the following notes: | ||||
- Installation directory is %%WWWDIR%% | - Installation directory is %%WWWDIR%% | ||||
- The following lines should be added to /etc/crontab: | |||||
NOTE: setting sql-mode="" is no longer required. You can remove | |||||
it from /usr/local/etc/mysql/my.cnf | |||||
HEADS UP | |||||
Polling via cron job is now deprecated. Please use the Dispatcher. | |||||
LibreNMS will be dropping support for PHP 7.1 and Python 2 in the next release | |||||
expected May 31 2020. see https://community.librenms.org/t/dropping-support-for-php-7-1-and-python-2/11851 | |||||
Your existing crontab entries for the PYPOLLER option will be going away. | |||||
You can migrate to the PYSERVICE option of LibreNMS now | |||||
driesm: PYSERVER/s/PYSERVICE | |||||
(also known as the Dispatcher Service). | |||||
The next release will not include the the PYPOLLER option. | |||||
PYROLLER (deprecated) configuration (default): | |||||
The following lines should be added to /etc/crontab: | |||||
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin | PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin | ||||
33 */6 * * * www cd %%WWWDIR%% && %%PHP%% discovery.php -h all >> /dev/null 2>&1 | 33 */6 * * * www cd %%WWWDIR%% && %%PHP%% discovery.php -h all >> /dev/null 2>&1 | ||||
*/5 * * * * www cd %%WWWDIR%% && %%PHP%% discovery.php -h new >> /dev/null 2>&1 | */5 * * * * www cd %%WWWDIR%% && %%PHP%% discovery.php -h new >> /dev/null 2>&1 | ||||
*/5 * * * * www cd %%WWWDIR%% && %%PYTHON%% poller-wrapper.py 16 >> /dev/null 2>&1 | */5 * * * * www cd %%WWWDIR%% && %%PYTHON%% poller-wrapper.py 16 >> /dev/null 2>&1 | ||||
15 0 * * * www %%LOCALBASE%%/bin/bash %%WWWDIR%%/daily.sh >> /dev/null 2>&1 | 15 0 * * * www %%LOCALBASE%%/bin/bash %%WWWDIR%%/daily.sh >> /dev/null 2>&1 | ||||
* * * * * www %%PHP%% %%WWWDIR%%/alerts.php >> /dev/null 2>&1 | * * * * * www %%PHP%% %%WWWDIR%%/alerts.php >> /dev/null 2>&1 | ||||
*/5 * * * * www %%PHP%% %%WWWDIR%%/poll-billing.php >> /dev/null 2>&1 | */5 * * * * www %%PHP%% %%WWWDIR%%/poll-billing.php >> /dev/null 2>&1 | ||||
01 * * * * www %%PHP%% %%WWWDIR%%/billing-calculate.php >> /dev/null 2>&1 | 01 * * * * www %%PHP%% %%WWWDIR%%/billing-calculate.php >> /dev/null 2>&1 | ||||
*/5 * * * * www %%PHP%% %%WWWDIR%%/check-services.php >> /dev/null 2>&1 | */5 * * * * www %%PHP%% %%WWWDIR%%/check-services.php >> /dev/null 2>&1 | ||||
For a fresh install, you need to create an APP_KEY: | PYSERVICE configuration (non-default): | ||||
Enable the poller service with this command: | |||||
sysrc librenms_enable="YES" | |||||
The service will log to /var/log/librems/librenms-service.log | |||||
see also https://docs.librenms.org/Extensions/Dispatcher-Service/ | |||||
When converting from PYPOLLER to the Dispatcher Service (PYSERVICE), | |||||
these steps will help you get started: | |||||
Done Inline ActionsShould probably mention that the port needs to be rebuild with PYSERVICE option? driesm: Should probably mention that the port needs to be rebuild with PYSERVICE option? | |||||
Done Inline Actions
dvl: * compile with PYSERVICE enabled and PYPOLLER disabled
| |||||
* compile with PYSERVICE enabled and PYPOLLER disabled | |||||
* comment out the crontab entries listed above under PYPOLLER | |||||
* populate %%WWWDIR%%/.env with: | |||||
* APP_KEY - see farther below for how to create | |||||
* NODE_ID - see just below for how to create | |||||
* DB_HOST | |||||
* DB_DATABASE | |||||
* DB_USERNAME | |||||
* DB_PASSWORD | |||||
* you can create a NODE_ID with: php -r 'echo uniqid() . "\n";' | |||||
When setting up a new install, you need a %%WWWDIR%%/.env file. | |||||
You need an APP_KEY. | |||||
To create: | |||||
cd %%WWWDIR%% | cd %%WWWDIR%% | ||||
cp -i .env.example .env | cp -i .env.example .env | ||||
That file will eventually contain secrets. Make sure it is not world-readable. | That file will eventually contain secrets. Make sure it is not world-readable. | ||||
When migrating to PYSERVICE (also known as the Dispatcher Service): | |||||
Done Inline ActionsPYSERVER/s/PYSERVICE driesm: PYSERVER/s/PYSERVICE | |||||
It is also a good idea to: | It is also a good idea to: | ||||
cd %%WWWDIR%% | cd %%WWWDIR%% | ||||
./validate | ./validate | ||||
You might need to set your database details in that file | Database connection details are required in that file. | ||||
Then run: | Then run: | ||||
php artisan key:generate | php artisan key:generate | ||||
The output should look something like this: | The output should look something like this: | ||||
************************************** | ************************************** | ||||
* Application In Production! * | * Application In Production! * | ||||
Show All 12 Lines | EOM | ||||
message: <<EOM | message: <<EOM | ||||
Depending on the version, you may have to run the upgrade script. | Depending on the version, you may have to run the upgrade script. | ||||
cd %%WWWDIR%% | cd %%WWWDIR%% | ||||
./build-base.php | ./build-base.php | ||||
re: https://docs.librenms.org/#General/Updating/ | re: https://docs.librenms.org/#General/Updating/ | ||||
Make sure your %%WWWDIR%%/.env file is not world-readable. | HEADS UP HEADS UP HEADS UP HEADS UP HEADS UP HEADS UP HEADS UP HEADS UP | ||||
Polling via cron job is now deprecated. Please use the Dispatcher. | |||||
LibreNMS will be dropping support for PHP 7.1 and Python 2 in the next release | |||||
expected May 31 2020. see https://community.librenms.org/t/dropping-support-for-php-7-1-and-python-2/11851 | |||||
Your existing crontab entries for the PYPOLLER option will be going away. | |||||
You can migrate to the PYSERVICE option of LibreNMS now | |||||
(also known as the Dispatcher Service). | |||||
The next release will not include the PYPOLLER option. | |||||
Done Inline Actionsthe the / s / the driesm: the the / s / the | |||||
For more information, see pkg info --pkg-message librenms | |||||
EOM | EOM | ||||
} | } | ||||
] | ] |
PYSERVER/s/PYSERVICE