setiseta / docker-librenms Goto Github PK
View Code? Open in Web Editor NEWLibreNMS Docker based on Phusion Baseimage
LibreNMS Docker based on Phusion Baseimage
Please can the LibreNMS Weather map plug-in be included in the build.
https://github.com/librenms-plugins/Weathermap
This would be a great addition to the container!
Hi,
I'm running
user@docker03:~/docker$ docker-compose --version
docker-compose version 1.18.0, build 8dd22a9
user@docker03:~/docker$ docker --version
Docker version 18.03.1-ce, build 9ee9f40
on Debian 9
using plain
docker-compose up -d
from scratch does not setup the database.
(just modified exposed port 80 to 82!)
user@docker03:~/docker/setiseta/docker-librenms$ docker-compose logs -f
Attaching to librenms, librenms-db
librenms | *** Running /etc/my_init.d/10_syslog-ng.init...
librenms | *** Running /etc/my_init.d/init.sh...
librenms | Cloning into 'librenms'...
librenms | Clone Repo from github.
librenms-db | Initializing database
librenms-db |
librenms-db |
librenms-db | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
librenms-db | To do so, start the server, then issue the following commands:
librenms-db |
librenms-db | '/usr/bin/mysqladmin' -u root password 'new-password'
librenms-db | '/usr/bin/mysqladmin' -u root -h password 'new-password'
librenms-db |
librenms-db | Alternatively you can run:
librenms-db | '/usr/bin/mysql_secure_installation'
librenms-db |
librenms-db | which will also give you the option of removing the test
librenms-db | databases and anonymous user created by default. This is
librenms-db | strongly recommended for production servers.
librenms-db |
librenms-db | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
librenms-db | MySQL manual for more instructions.
librenms-db |
librenms-db | Please report any problems at http://mariadb.org/jira
librenms-db |
librenms-db | The latest information about MariaDB is available at http://mariadb.org/.
librenms-db | You can find additional information about the MySQL part at:
librenms-db | http://dev.mysql.com
librenms-db | Consider joining MariaDB's strong and vibrant community:
librenms-db | https://mariadb.org/get-involved/
librenms-db |
librenms-db | Database initialized
librenms-db | MySQL init process in progress...
librenms-db | 2018-07-27 10:49:13 0 [Note] mysqld (mysqld 10.3.8-MariaDB-1:10.3.8+maria~bionic) starting as process 99 ...
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: Using Linux native AIO
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: Uses event mutexes
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: Number of pools: 1
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: Using SSE2 crc32 instructions
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: Completed initialization of buffer pool
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: Creating shared tablespace for temporary tables
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
librenms-db | 2018-07-27 10:49:13 0 [Note] InnoDB: Waiting for purge to start
librenms-db | 2018-07-27 10:49:14 0 [Note] InnoDB: 10.3.8 started; log sequence number 1630824; transaction id 21
librenms-db | 2018-07-27 10:49:14 0 [Note] Plugin 'FEEDBACK' is disabled.
librenms-db | 2018-07-27 10:49:14 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
librenms-db | 2018-07-27 10:49:14 0 [Warning] 'user' entry 'root@812d57470340' ignored in --skip-name-resolve mode.
librenms-db | 2018-07-27 10:49:14 0 [Warning] 'user' entry '@812d57470340' ignored in --skip-name-resolve mode.
librenms-db | 2018-07-27 10:49:14 0 [Warning] 'proxies_priv' entry '@% root@812d57470340' ignored in --skip-name-resolve mode.
librenms-db | 2018-07-27 10:49:14 0 [Note] InnoDB: Buffer pool(s) load completed at 180727 10:49:14
librenms-db | 2018-07-27 10:49:14 0 [Note] Reading of all Master_info entries succeded
librenms-db | 2018-07-27 10:49:14 0 [Note] Added new Master_info '' to hash table
librenms-db | 2018-07-27 10:49:14 0 [Note] mysqld: ready for connections.
librenms-db | Version: '10.3.8-MariaDB-1:10.3.8+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution
librenms-db | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
librenms-db | 2018-07-27 10:49:21 10 [Warning] 'proxies_priv' entry '@% root@812d57470340' ignored in --skip-name-resolve mode.
librenms-db |
librenms-db | 2018-07-27 10:49:21 0 [Note] mysqld (initiated by: unknown): Normal shutdown
librenms-db | 2018-07-27 10:49:21 0 [Note] InnoDB: FTS optimize thread exiting.
librenms-db | 2018-07-27 10:49:21 0 [Note] Event Scheduler: Purging the queue. 0 events
librenms-db | 2018-07-27 10:49:21 0 [Note] InnoDB: Starting shutdown...
librenms-db | 2018-07-27 10:49:21 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
librenms-db | 2018-07-27 10:49:21 0 [Note] InnoDB: Buffer pool(s) dump completed at 180727 10:49:21
librenms-db | 2018-07-27 10:49:23 0 [Note] InnoDB: Shutdown completed; log sequence number 1630833; transaction id 24
librenms-db | 2018-07-27 10:49:23 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
librenms-db | 2018-07-27 10:49:23 0 [Note] mysqld: Shutdown complete
librenms-db |
librenms-db |
librenms-db | MySQL init process done. Ready for start up.
librenms-db |
librenms-db | 2018-07-27 10:49:24 0 [Note] mysqld (mysqld 10.3.8-MariaDB-1:10.3.8+maria~bionic) starting as process 1 ...
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Using Linux native AIO
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Uses event mutexes
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Number of pools: 1
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Using SSE2 crc32 instructions
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Completed initialization of buffer pool
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Creating shared tablespace for temporary tables
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Waiting for purge to start
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: 10.3.8 started; log sequence number 1630833; transaction id 21
librenms-db | 2018-07-27 10:49:24 0 [Note] Plugin 'FEEDBACK' is disabled.
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
librenms-db | 2018-07-27 10:49:24 0 [Note] Server socket created on IP: '::'.
librenms-db | 2018-07-27 10:49:24 0 [Warning] 'proxies_priv' entry '@% root@812d57470340' ignored in --skip-name-resolve mode.
librenms-db | 2018-07-27 10:49:24 0 [Note] InnoDB: Buffer pool(s) load completed at 180727 10:49:24
librenms-db | 2018-07-27 10:49:24 0 [Note] Reading of all Master_info entries succeded
librenms-db | 2018-07-27 10:49:24 0 [Note] Added new Master_info '' to hash table
librenms-db | 2018-07-27 10:49:24 0 [Note] mysqld: ready for connections.
librenms-db | Version: '10.3.8-MariaDB-1:10.3.8+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
librenms |
librenms | Current default time zone: 'Etc/UTC'
librenms | Local time is now: Fri Jul 27 10:49:56 UTC 2018.
librenms | Universal Time is now: Fri Jul 27 10:49:56 UTC 2018.
librenms |
librenms | Waiting for database server to accept connections
librenms | DB connection is ok
librenms | mysql: [Warning] Using a password on the command line interface can be insecure.
librenms | Activate master services
librenms | ============================================
librenms | Run daily to switch to update channel
librenms |
librenms | On a fresh installation, the database will be set up. Please be patient
librenms |
librenms | Re-running /opt/librenms/daily.sh as librenms user
librenms | > LibreNMS\ComposerHelper::preInstall
librenms | Unstaged changes after reset:
librenms | D html/plugins/Test/Test.inc.php
librenms | D html/plugins/Test/Test.php
librenms | D logs/.gitignore
librenms | D rrd/.gitignore
librenms | Loading composer repositories with package information
librenms | Installing dependencies from lock file
librenms | Package operations: 63 installs, 0 updates, 0 removals
librenms | - Installing symfony/dotenv (v3.4.12): Downloading (100%)
librenms | - Installing amenadiel/jpgraph (3.6.20): Downloading (100%)
librenms | - Installing dapphp/radius (2.5.4): Downloading (100%)
librenms | - Installing doctrine/inflector (v1.1.0): Downloading (100%)
librenms | - Installing doctrine/instantiator (1.0.5): Downloading (100%)
librenms | - Installing easybook/geshi (v1.0.8.19): Downloading (100%)
librenms | - Installing erusev/parsedown (1.7.1): Downloading (100%)
librenms | - Installing ezyang/htmlpurifier (v4.10.0): Downloading (100%)
librenms | - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
librenms | - Installing psr/http-message (1.0.1): Downloading (100%)
librenms | - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)
librenms | - Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)
librenms | - Installing influxdb/influxdb-php (1.14.7): Downloading (100%)
librenms | - Installing jakub-onderka/php-console-color (0.1): Downloading (100%)
librenms | - Installing symfony/polyfill-mbstring (v1.8.0): Downloading (100%)
librenms | - Installing symfony/var-dumper (v3.4.12): Downloading (100%)
librenms | - Installing psr/log (1.0.2): Downloading (100%)
librenms | - Installing symfony/debug (v3.4.12): Downloading (100%)
librenms | - Installing symfony/console (v3.4.12): Downloading (100%)
librenms | - Installing nikic/php-parser (v3.1.5): Downloading (100%)
librenms | - Installing jakub-onderka/php-console-highlighter (v0.3.2): Downloading (100%)
librenms | - Installing dnoegel/php-xdg-base-dir (0.1): Downloading (100%)
librenms | - Installing psy/psysh (v0.9.6): Downloading (100%)
librenms | - Installing vlucas/phpdotenv (v2.4.0): Downloading (100%)
librenms | - Installing symfony/css-selector (v3.4.12): Downloading (100%)
librenms | - Installing tijsverkoyen/css-to-inline-styles (2.2.1): Downloading (100%)
librenms | - Installing symfony/routing (v3.2.14): Downloading (100%)
librenms | - Installing symfony/process (v3.4.12): Downloading (100%)
librenms | - Installing symfony/polyfill-ctype (v1.8.0): Downloading (100%)
librenms | - Installing paragonie/random_compat (v2.0.17): Downloading (100%)
librenms | - Installing symfony/polyfill-php70 (v1.8.0): Downloading (100%)
librenms | - Installing symfony/http-foundation (v3.4.12): Downloading (100%)
librenms | - Installing symfony/event-dispatcher (v3.4.12): Downloading (100%)
librenms | - Installing symfony/http-kernel (v3.4.12): Downloading (100%)
librenms | - Installing symfony/finder (v3.4.12): Downloading (100%)
librenms | - Installing swiftmailer/swiftmailer (v5.4.9): Downloading (100%)
librenms | - Installing ramsey/uuid (3.7.3): Downloading (100%)
librenms | - Installing symfony/translation (v3.2.14): Downloading (100%)
librenms | - Installing nesbot/carbon (1.32.0): Downloading (100%)
librenms | - Installing mtdowling/cron-expression (v1.2.1): Downloading (100%)
librenms | - Installing monolog/monolog (1.23.0): Downloading (100%)
librenms | - Installing league/flysystem (1.0.45): Downloading (100%)
librenms | - Installing laravel/framework (v5.4.36): Downloading (100%)
librenms | - Installing laravel/tinker (v1.0.7): Downloading (100%)
librenms | - Installing laravel/laravel (v5.4.30): Downloading (100%)
librenms | - Installing myclabs/deep-copy (1.7.0): Downloading (100%)
librenms | - Installing oriceon/toastr-5-laravel (dev-master 8a03502): Cloning 8a03502cc7 from cache
librenms | - Installing slim/slim (2.6.3): Downloading (100%)
librenms | - Installing palanik/corsslim (v1.1.0): Downloading (100%)
librenms | - Installing pear/console_color2 (0.1.2): Downloading (100%)
librenms | - Installing pear/console_table (v1.3.1): Downloading (100%)
librenms | - Installing php-amqplib/php-amqplib (v2.0.2): Downloading (100%)
librenms | - Installing webmozart/assert (1.3.0): Downloading (100%)
librenms | - Installing phpdocumentor/reflection-common (1.0.1): Downloading (100%)
librenms | - Installing phpdocumentor/type-resolver (0.4.0): Downloading (100%)
librenms | - Installing phpdocumentor/reflection-docblock (3.3.2): Downloading (100%)
librenms | - Installing phpmailer/phpmailer (v5.2.26): Downloading (100%)
librenms | - Installing phpunit/php-token-stream (1.4.12): Downloading (100%)
librenms | - Installing rmccue/requests (v1.7.0): Downloading (100%)
librenms | - Installing symfony/yaml (v2.8.42): Downloading (100%)
librenms | - Installing tecnickcom/tcpdf (6.2.17): Downloading (100%)
librenms | - Installing wpb/string-blade-compiler (3.4.x-dev 30c974a): Cloning 30c974a305 from cache
librenms | - Installing xjtuwangke/passwordhash (dev-master a7bcd97): Cloning a7bcd9705a from cache
librenms | Generating autoload files
librenms | > LibreNMS\ComposerHelper::postInstall
librenms | setfacl: logs//librenms.log: Operation not permitted
librenms | setfacl: logs/: Operation not permitted
librenms | Application key [base64:Y4ay1J/XhIN69MLO4kGsxYaRHWfHDjcUktTAHIYqFfU=] set successfully.
librenms | > Illuminate\Foundation\ComposerScripts::postInstall
librenms | > php artisan optimize
librenms | Generating optimized class loader
librenms | The compiled services file has been removed.
librenms | MySQL Error: Table 'librenms.config' doesn't exist (SELECT `config_name`,`config_value` FROM `config`)
librenms | MySQL Error: Table 'librenms.graph_types' doesn't exist (SELECT * FROM graph_types)
librenms | MySQL Error: Table 'librenms.config' doesn't exist (UPDATE `config` set `config_value` ='/usr/bin/fping' WHERE `config_name`='fping')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (SELECT 1 FROM `config` WHERE `config_name`='fping')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_sub_group`) VALUES ('fping','/usr/bin/fping','fping','Path to fping','external','paths'))
librenms | MySQL Error: Table 'librenms.config' doesn't exist (UPDATE `config` set `config_value` ='/usr/bin/fping6' WHERE `config_name`='fping6')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (SELECT 1 FROM `config` WHERE `config_name`='fping6')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_sub_group`) VALUES ('fping6','/usr/bin/fping6','fping6','Path to fping6','external','paths'))
librenms | MySQL Error: Table 'librenms.config' doesn't exist (UPDATE `config` set `config_value` ='/usr/bin/snmpgetnext' WHERE `config_name`='snmpgetnext')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (SELECT 1 FROM `config` WHERE `config_name`='snmpgetnext')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_sub_group`) VALUES ('snmpgetnext','/usr/bin/snmpgetnext','snmpgetnext','Path to snmpgetnext','external','paths'))
librenms | MySQL Error: Table 'librenms.config' doesn't exist (UPDATE `config` set `config_value` ='/usr/bin/rrdtool' WHERE `config_name`='rrdtool')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (SELECT 1 FROM `config` WHERE `config_name`='rrdtool')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_sub_group`) VALUES ('rrdtool','/usr/bin/rrdtool','rrdtool','Path to rrdtool','external','paths'))
librenms | MySQL Error: Table 'librenms.config' doesn't exist (SELECT `config_name`,`config_value` FROM `config`)
librenms | MySQL Error: Table 'librenms.graph_types' doesn't exist (SELECT * FROM graph_types)
librenms | MySQL Error: Table 'librenms.config' doesn't exist (UPDATE `config` set `config_value` ='/usr/bin/fping' WHERE `config_name`='fping')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (SELECT 1 FROM `config` WHERE `config_name`='fping')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_sub_group`) VALUES ('fping','/usr/bin/fping','fping','Path to fping','external','paths'))
librenms | MySQL Error: Table 'librenms.config' doesn't exist (UPDATE `config` set `config_value` ='/usr/bin/fping6' WHERE `config_name`='fping6')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (SELECT 1 FROM `config` WHERE `config_name`='fping6')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_sub_group`) VALUES ('fping6','/usr/bin/fping6','fping6','Path to fping6','external','paths'))
librenms | MySQL Error: Table 'librenms.config' doesn't exist (UPDATE `config` set `config_value` ='/usr/bin/snmpgetnext' WHERE `config_name`='snmpgetnext')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (SELECT 1 FROM `config` WHERE `config_name`='snmpgetnext')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_sub_group`) VALUES ('snmpgetnext','/usr/bin/snmpgetnext','snmpgetnext','Path to snmpgetnext','external','paths'))
librenms | MySQL Error: Table 'librenms.config' doesn't exist (UPDATE `config` set `config_value` ='/usr/bin/rrdtool' WHERE `config_name`='rrdtool')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (SELECT 1 FROM `config` WHERE `config_name`='rrdtool')
librenms | MySQL Error: Table 'librenms.config' doesn't exist (INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_sub_group`) VALUES ('rrdtool','/usr/bin/rrdtool','rrdtool','Path to rrdtool','external','paths'))
librenms | MySQL Error: Table 'librenms.notifications' doesn't exist (SELECT `notifications_id` FROM `notifications` WHERE `title`='Warning: PHP version too low')
librenms | MySQL Error: Table 'librenms.notifications' doesn't exist (SELECT `notifications_id` FROM `notifications` WHERE `title`='Error: PHP version too low')
librenms | Updating to latest codebase OK
librenms | Updating Composer packages OK
librenms | Updating SQL-Schema OK
librenms | Updating submodules OK
librenms | Cleaning up DB OK
librenms | Fetching notifications OK
librenms | Caching PeeringDB data OK
librenms | Setting up LibreNMS for firstrun.
librenms | User librenms added successfully
librenms | warning: commands will be executed using /bin/sh
librenms | job 1 at Fri Jul 27 10:58:00 2018
librenms | init done
librenms | *** Running /etc/rc.local...
librenms | *** Booting runit daemon...
librenms | *** Runit started as PID 20523
librenms | starting up
librenms | setgid(999) succeeded
librenms | setuid(999) succeeded
librenms | checking for journal files
librenms | started new journal /tmp/rrd.journal.1532689071.923598
librenms | journal processing complete
librenms | listening for connections
librenms-db | 2018-07-27 11:00:10 10 [Warning] Aborted connection 10 to db: 'librenms' user: 'root' host: '172.25.0.3' (Got timeout reading communication packets)
docker-compose.yml
only change TZ to Asia/Taipei and expose port to 81
version: '3'
services:
mysql:
image: mariadb
container_name: librenms-db
volumes:
- ./mysql:/var/lib/mysql
- ./50-server.cnf:/etc/mysql/mariadb.conf.d/50-server.cnf:ro
environment:
- MYSQL_ROOT_PASSWORD=pwd4librenms
- MYSQL_DATABASE=librenms
- TZ=Asia/Taipei
restart: always
librenms:
build: .
image: seti/librenms
container_name: librenms
hostname: librenms
volumes:
- ./data:/data
ports:
- 81:80
- 514:514/tcp
- 514:514/udp
depends_on:
- mysql
environment:
- DB_TYPE=mysql
- DB_HOST=mysql
- DB_NAME=librenms
- DB_USER=root
- DB_PASS=pwd4librenms
- TZ=Asia/Taipei
- POLLER=24
- SERVICES_ENABLED=1
- UPDATE_CHANNEL=master
- SYSLOG_ENABLED=1
restart: always
docker logs librenms
*** Running /etc/my_init.d/init.sh...
Current default time zone: 'Asia/Taipei'
Local time is now: Fri Sep 4 12:19:51 CST 2020.
Universal Time is now: Fri Sep 4 04:19:51 UTC 2020.
ln: failed to create symbolic link '/opt/librenms/config.php': File exists
Waiting for database server to accept connections
...........................................................
Could not connect to database server. Aborting...
*** /etc/my_init.d/init.sh failed with status 1
*** Killing all processes...
Sep 4 12:20:51 librenms syslog-ng[11]: syslog-ng shutting down; version='3.13.2'
*** Running /etc/my_init.d/10_syslog-ng.init...
Sep 4 12:20:53 librenms syslog-ng[12]: syslog-ng starting up; version='3.13.2'
*** Running /etc/my_init.d/init.sh...
Current default time zone: 'Asia/Taipei'
Local time is now: Fri Sep 4 12:20:54 CST 2020.
Universal Time is now: Fri Sep 4 04:20:54 UTC 2020.
ln: failed to create symbolic link '/opt/librenms/config.php': File exists
Waiting for database server to accept connections
2020-09-04 12:21:46 [minion@bbs013 docker-librenms]$
docker logs librenms-db
2020-09-04 12:58:46 60485 [Warning] Access denied for user 'librenms'@'172.23.0.3' (using password: NO)
2020-09-04 12:58:46 60486 [Warning] Access denied for user 'librenms'@'172.23.0.3' (using password: NO)
2020-09-04 12:58:46 60487 [Warning] Access denied for user 'librenms'@'172.23.0.3' (using password: NO)
2020-09-04 12:58:46 60488 [Warning] Access denied for user 'librenms'@'172.23.0.3' (using password: NO)
2020-09-04 12:58:46 60489 [Warning] Access denied for user 'librenms'@'172.23.0.3' (using password: NO)
2020-09-04 12:58:46 60490 [Warning] Access denied for user 'librenms'@'172.23.0.3' (using password: NO)
2020-09-04 12:58:46 60491 [Warning] Access denied for user 'librenms'@'172.23.0.3' (using password: NO)
After I clone the repo and use docker-compose up -d
to startup the service,
this error shown in Notifications page
Error: Python requirements not met
Python 3 dependencies are missing. You need to install them via pip3 install -r requirements.txt or system packages to continue to receive updates. If you do not install Python 3 and required packages, LibreNMS will continue to function but stop receiving bug fixes and updates.
2020-10-17 00:00:00 | Source: daily.sh
I know I can use docker exec
to run pip3 install -r requirements.txt
every time to fix it temporary.
But I think this issue should be fixed fundamentally.
Hi,
I'm getting issues with rrdcache not reliably starting. I believe due to the pid file having the process-id to another process within, as removing this pid file makes it come back ok.
I'm having to go and clean the pid file to fix rrdcache about half the times it starts up.
Examples:
root@Tower:~# docker stop librenms
librenms
root@Tower:~# docker start librenms
librenms
root@Tower:~# docker exec -it librenms bash
root@b51f9efe9ee2:/# ps auxw | grep rrdcache
root 47 0.0 0.0 4240 672 ? Ss 19:02 0:00 runsv rrdcached
librenms 50 0.2 0.0 142912 6976 ? Sl 19:02 0:00 rrdcached -g -w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -B -R -j /var/tmp -l unix:/var/run/rrdcached/rrdcached.sock -t 4 -F -b /data/rrd/
root 94 0.0 0.0 17716 960 ? S+ 19:02 0:00 grep --color=auto rrdcache
root@b51f9efe9ee2:/# exit
root@Tower:~# docker stop librenms
librenms
root@Tower:~# docker start librenms
librenms
root@Tower:~# docker exec -it librenms bash
root@b51f9efe9ee2:/# ps auxw | grep rrdcache
root 46 0.1 0.0 4240 652 ? Ss 19:02 0:00 runsv rrdcached
root 92 0.0 0.0 17716 984 ? S+ 19:02 0:00 grep --color=auto rrdcache
root@b51f9efe9ee2:/#
root@b51f9efe9ee2:/# cat /var/run/rrdcached.pid
50
root@b51f9efe9ee2:/# ps auxw | grep 50
root 50 0.0 0.0 32504 2968 ? S 19:02 0:00 /usr/sbin/cron -f
root 110 0.0 0.0 17716 1016 ? S+ 19:02 0:00 grep --color=auto 50
root@b51f9efe9ee2:/# cd /etc/service/rrdcached/supervise/
root@b51f9efe9ee2:/etc/service/rrdcached/supervise# cat pid
root@b51f9efe9ee2:/etc/service/rrdcached/supervise# ls
control lock ok pid stat status
root@b51f9efe9ee2:/etc/service/rrdcached/supervise# ls -l
total 8
prw------- 1 root root 0 Nov 20 19:02 control
-rw------- 1 root root 0 Nov 14 11:19 lock
prw------- 1 root root 0 Nov 14 11:19 ok
-rw-r--r-- 1 root root 0 Nov 20 19:03 pid
-rw-r--r-- 1 root root 5 Nov 20 19:03 stat
-rw-r--r-- 1 root root 20 Nov 20 19:03 status
root@b51f9efe9ee2:/etc/service/rrdcached/supervise# rm /var/run/rrdcached.pid
root@b51f9efe9ee2:/etc/service/rrdcached/supervise# ps auxw | grep rrdcache
root 46 0.1 0.0 4240 1172 ? Ss 19:02 0:00 runsv rrdcached
librenms 751 0.2 0.0 142912 7280 ? Sl 19:03 0:00 rrdcached -g -w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -B -R -j /var/tmp -l unix:/var/run/rrdcached/rrdcached.sock -t 4 -F -b /data/rrd/
root 849 0.0 0.0 17716 980 ? S+ 19:03 0:00 grep --color=auto rrdcache
root@b51f9efe9ee2:/etc/service/rrdcached/supervise#
not sure whats causing this but the validate.php is throwing an error
Fail: fping6 could not be executed. fping6 must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required. (::1: error while sending ping: Cannot assign requested address ::1: error while sending ping: Cannot assign requested address ::1: error while sending ping: Cannot assign requested address ::1: error while sending ping: Cannot assign requested address ::1 is unreachable)
Fail: fping6 should have CAP_NET_RAW!
setcap cap_net_raw+ep /usr/bin/fping6
i tried adding capnetraw to the docker run but that isn't the issue apparently.
2 things really would it be possible for you to add in python-ipaddress to the build, so that snmp-scan.php will work inside the container.
Secondly any chance of adding a toggle to enable a weekly call to snmp-scan.php ? just wondering
thanks for the wonderful tool ,but I have a problem about setting timezone
I modify the docker-compose.yml to fit my timezone (Asia/Taipei)
here is the docker-compose.yml
version: '3'
services:
mysql:
image: mariadb
container_name: librenms-db
volumes:
- ./mysql:/var/lib/mysql
- ./50-server.cnf:/etc/mysql/mariadb.conf.d/50-server.cnf:ro
environment:
- MYSQL_ROOT_PASSWORD=librenms
- MYSQL_DATABASE=librenms
restart: always
librenms:
build: .
image: seti/librenms
container_name: librenms
hostname: librenms
volumes:
- ./data:/data
ports:
- 8002:80
- 514:514/tcp
- 514:514/udp
depends_on:
- mysql
environment:
- DB_TYPE=mysql
- DB_HOST=mysql
- DB_NAME=librenms
- DB_USER=root
- DB_PASS=librenms
- TZ="Asia/Taipei"
- POLLER=24
- SERVICES_ENABLED=1
- UPDATE_CHANNEL=master
- SYSLOG_ENABLED=1
restart: always
But I foun the time on webpage is still UTC , not 'Asia/Taipei'
is there other way to change librenms timezone ?
Any chance you could add a way to disable the various crontab'd services. Like if i want to use your image but only want it to run polling i could disable the discovery...
This is so that for distributed setups i can have 1 docker container run discovery and then say 3-4 that don't run the discovery but run only say the poller... being able to disable/enable the scheduled services via an environment variable would really be nice addition as right now i can't figure a way to do it.
While i'm at it, adding an environmental override for the rrdcached setting so that in a distributed deployment we can tell the librenms to use a specific rrdcached ip/dns for rrd would really be nice as i think right now your overriding it in the config when the container is recreated and it always sets it to the local unix socket instance.
good morning , after rolling out initial login doesnt work , any idea how to fix ist ?
Greets
Michael
Thank you for producing a docker container for librenms! I was testing this out last night and I've found that the use of relative paths in the docker run command end up creating a directory instead of a file.
Running this command:
docker run -d -m 1g
-v pwd
/mysql:/var/lib/mysql
-v pwd
/50-server.cnf:/etc/mysql/mariadb.conf.d/50-server.cnf:ro
-e MYSQL_ROOT_PASSWORD=pwd4librenms
--name librenms-db
mariadb:latest
Creates 50-server.cnf as directory, instead of a folder.
Modifying the command to specify the full path results in 50-server.cnf being created as a file, as I believe is intended.
I found useful information in this post:
moby/moby#24408
Hi,
While clicking on any diagram, the address cannot link to correct address.
Please see the screen shot.
https://imgur.com/a/DS4Im7Y
For stability reasons the LibreNMS source should be checked out based on a specific release.
What about an environment variable called LIBRENMS_VERSION
with the value of a git checkout [VERSION]
from LibreNMS Tags? The default can be the master
branch.
After the git clone
command here in init.sh
should be a git checkout
to the specified version
docker logs
librenms |
librenms | /etc/my_init.d/init.sh: line 45: cd: /opt/librenms: No such file or directory
librenms | mv: cannot stat '/opt/librenms/rrd/.gitignore': No such file or directory
librenms | ln: failed to create symbolic link '/opt/librenms/rrd': No such file or directory
librenms | ln: failed to create symbolic link '/opt/librenms/html/plugins': No such file or directory
librenms | mv: cannot stat '/opt/librenms/logs/.gitignore': No such file or directory
librenms | ln: failed to create symbolic link '/opt/librenms/logs': No such file or directory
librenms | cp: cannot stat '/opt/librenms/librenms.nonroot.cron': No such file or directory
librenms | chmod: cannot access '/etc/cron.d/librenms': No such file or directory
librenms | cp: cannot stat '/opt/librenms/misc/librenms.logrotate': No such file or directory
librenms | ln: failed to create symbolic link '/opt/librenms/config.php': No such file or directory
librenms | chown: cannot access '/opt/librenms': No such file or directory
librenms | sed: can't read /etc/cron.d/librenms: No such file or directory
librenms | sed: can't read /etc/cron.d/librenms: No such file or directory
librenms | sed: can't read /etc/cron.d/librenms: No such file or directory
librenms | Waiting for database server to accept connections
librenms | DB connection is ok
librenms | mysql: [Warning] Using a password on the command line interface can be insecure.
librenms | Activate master services
librenms | chown: cannot access '/opt/librenms': No such file or directory
librenms | setfacl: /opt/librenms/rrd: No such file or directory
librenms | setfacl: /opt/librenms/logs: No such file or directory
librenms | setfacl: /opt/librenms/bootstrap/cache/: No such file or directory
librenms | setfacl: /opt/librenms/storage/: No such file or directory
librenms | setfacl: /opt/librenms/rrd: No such file or directory
librenms | setfacl: /opt/librenms/logs: No such file or directory
librenms | setfacl: /opt/librenms/bootstrap/cache/: No such file or directory
librenms | setfacl: /opt/librenms/storage/: No such file or directory
librenms | ============================================
librenms | Run daily to switch to update channel
librenms |
librenms | On a fresh installation, the database will be set up. Please be patient
librenms |
librenms | /etc/my_init.d/init.sh: line 368: /opt/librenms/daily.sh: No such file or directory
librenms | /etc/my_init.d/init.sh: line 373: cd: /opt/librenms: No such file or directory
librenms | warning: commands will be executed using /bin/sh
librenms | job 1 at Wed Aug 18 16:01:00 2021
librenms | init done
librenms | *** Booting runit daemon...
librenms | *** Runit started as PID 6315
librenms | nginx: [emerg] open() "/opt/librenms/logs/access_log" failed (2: No such file or directory)
librenms | nginx: [emerg] open() "/opt/librenms/logs/access_log" failed (2: No such file or directory)
librenms | nginx: [emerg] open() "/opt/librenms/logs/access_log" failed (2: No such file or directory)
docker-compose.yml
version: '3'
services:
mysql:
image: mariadb
container_name: librenms-db
volumes:
- ./mysql:/var/lib/mysql
- ./50-server.cnf:/etc/mysql/mariadb.conf.d/50-server.cnf:ro
environment:
- MYSQL_ROOT_PASSWORD=pwd4librenms
- MYSQL_DATABASE=librenms
- TZ=Asia/Taipei
restart: always
librenms:
image: seti/librenms
container_name: librenms
hostname: librenms
volumes:
- ./data:/data
ports:
- 8003:80
- 514:514/tcp
- 514:514/udp
depends_on:
- mysql
environment:
- DB_TYPE=mysql
- DB_HOST=mysql
- DB_NAME=librenms
- DB_USER=root
- DB_PASS=pwd4librenms
- TZ=Asia/Taipei
- POLLER=24
- SERVICES_ENABLED=1
- UPDATE_CHANNEL=master
- SYSLOG_ENABLED=1
restart: always
any suggestions ??
Since the Laravel PR was merged in LibreNMS upstream yesterday, my production and test seti/librenms container web interfaces both stopped. All endpoints presented:
Error: Missing dependencies! Run the following command to fix:
./scripts/composer_wrapper.php install --no-dev
I removed the containers, pulled the image again and ran the container, but same error.
Attempting to run ./daily.sh manually in the container or call the composer wrapper does not work either.
Error: retrieving gpg key timed out.
what should i do, anyone can help me? thank u
After run docker-compose up -d, i got this error.
Could anyone please help?
Thank you
Starting librenms-db ... error
ERROR: for librenms-db Cannot start service mysql: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/home/itadmin/librenms/50-server.cnf" to rootfs at "/etc/mysql/mariadb.conf.d/50-server.cnf" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: for mysql Cannot start service mysql: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/home/itadmin/librenms/50-server.cnf" to rootfs at "/etc/mysql/mariadb.conf.d/50-server.cnf" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.
hia,
following your install instructions librenms reports "Mysql error", and logs report failure to connect to mysql:
:~# docker logs librenms
*** Running /etc/my_init.d/init.sh...
Clone Repo from github.
Cloning into 'librenms'...
Waiting for database server to accept connectionsSetting up Librenms for firstrun.
Created directory: /var/lib/snmp/mib_indexes
PHP Warning: mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /opt/librenms/build-base.php on line7
ERROR: Cannot connect to database:
PHP Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given in /opt/librenms/build-base.php on line 19
warning: commands will be executed using /bin/sh
job 1 at Mon Nov 16 17:43:00 2015
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 47
tail: unrecognized file system type 0x794c7630 for ‘/var/log/syslog’. please report this to [email protected]. reverting to polling
Looks like they started requiring composer to be installed so you need to call
./scripts/composer_wrapper.php install --no-dev
during the first run, in addition you will need zip/unzip available
Would it be possible to include oxidized in this docker?
I noticed that the commit c6c9f56 updates the LibreNMS source even if it is not previously setup. The container does not start up after several minutes.
The setup should be done before the update, so please switch the order
There is an undocumented config option namely 'auth_ldap_groupmembertype' (see here) which defines the ldap attribute to be used for group authorization. The allowed values are:
fulldn
: {LDAP_PREFIX}{USERNAME}{LDAP_SUFFIX}puredn
: Search for ldap dnThe option should be available to set with an environment variable LDAP_GROUP_MEMBER_TYPE
.
Hi,
I clone your git repo, and execute [ docker-compose up -d ] on my macbook, but can't access librenms website, the Chrome browser shows [ ERR_CONNECTION_REFUSED ], could you help me what's wrong with this ?
Hi Author
After runing docker-compose up -d, I meet the issue (as title).
I noticed that the /data/config/config.php
inside the container grows with every start. This results because init.sh
append lines to config.php
even if they already exist.
Solutions I can imagine:
sed -i
is maybe a choice; with a regex)config.php.template
) specifying the structure of config.php
and substitute values on container startI am open for hints
As port bindings in docker-compose.yml
, it shows port 514 (port for rsyslog) is binded.
But when I tried to send log using rsyslog, it refused connection.
And I found that port 514 is not listened in the container.
After checking the config files, I found the related config for receive remote log was be disabled in the following changes.
I think some parts of these commit need to be revert in order to receive remote syslog.
Here is one solusion for reference.
In syslog-ng.conf
After #source s_net { tcp(ip(127.0.0.1) port(1000)); };
, add these lines back,
source s_net {
tcp(port(514) flags(syslog-protocol));
udp(port(514) flags(syslog-protocol));
};
And change log {source(s_src); destination(d_librenms);};
to these,
log {
source(s_src);
source(s_net);
destination(d_librenms);
};
Hello,
Composer is unhappy about mbstring missing on latest version, adding apt package php7.0-mbstring does the trick
# ./scripts/composer_wrapper.php install --no-dev Do not run Composer as root/super user! See https://getcomposer.org/root for details > LibreNMS\ComposerHelper::preInstall Loading composer repositories with package information Installing dependencies from lock file Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for erusev/parsedown 1.7.1 -> satisfiable by erusev/parsedown[1.7.1]. - erusev/parsedown 1.7.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. Problem 2 - Installation request for laravel/framework v5.4.36 -> satisfiable by laravel/framework[v5.4.36]. - laravel/framework v5.4.36 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. Problem 3 - laravel/framework v5.4.36 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. - oriceon/toastr-5-laravel dev-master requires illuminate/session >=5.0.0 -> satisfiable by laravel/framework[v5.4.36]. - Installation request for oriceon/toastr-5-laravel dev-master -> satisfiable by oriceon/toastr-5-laravel[dev-master].
Edit : No sure if my issue is really legit, docker hub image seems to be working fine.
Hi,
installed mysql and librenms docker containers as per guide.
Dumb question: do i need to run docker-compose up -d
to start before 2 x docker run? I figured I just run docker run mysql
and docker run librenms
directly.
When opening URL I get:
php_network_getaddresses: getaddrinfo failed: Name or service not known
validate.php gives me
Component | Version |
---|---|
LibreNMS | 1.33-128-g59625dc |
DB Schema | 215 |
PHP | 7.0.22-0ubuntu0.16.04.1 |
MySQL | 10.2.10-MariaDB-10.2.10+maria~jessie |
RRDTool | 1.5.5 |
SNMP | NET-SNMP 5.7.3 |
==================================== |
[OK] Database connection successful
[OK] Database schema correct
PHP Warning: date(): Invalid date.timezone value 'Americas/Los_Angeles', we selected the timezone 'UTC' for now. in Command line code on line 1
[FAIL] You have a different system timezone (Americas) than the php configured timezone (UTC)
[FIX] Please correct either your system timezone or your timezone set in php.ini.
[WARN] You have not added any devices yet.
[FIX] You can add a device in the webui or with ./addhost.php
sh: 1: 1: not found
[FAIL] fping6 could not be executed. fping6 must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required.
(::1: error while sending ping: Network is unreachable ::1: error while sending ping: Network is unreachable ::1: error while sending ping: Network is unreachable ::1: error while sending ping: Network is unreachable ::1 is unreachable)
[FAIL] fping6 should have CAP_NET_RAW!
[FIX] setcap cap_net_raw+ep /usr/bin/fping6
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX] You can fix this with ./scripts/github-remove
Modified Files:
html/plugins/Test/Test.inc.php
html/plugins/Test/Test.php`
daily.sh gives me:
root@4f26cb5edb92:/opt/librenms# ./daily.sh Re-running /opt/librenms/daily.sh as librenms user Checking PHP version FAIL MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known grep: config.php: Permission denied Updating SQL-Schema FAIL MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known Updating submodules OK Cleaning up DB FAIL MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known Fetching notifications FAIL MySQL Error: php_network_getaddresses: getaddrinfo failed: Name or service not known Caching PeeringDB data OK
What am i missing ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.