Server Migration Issue. Ubuntu 16.04 to 18.04. Device.php has added lines

Server Migration and upgrade issue.

Short Story…/opt/librenms/app/Models/Device.php, Had the <<<<< HEAD, ====, >>>>> lines added to the files during the upgrade processes. I just commented it out and it works now. Below is my long email about the upgrade that i was going to post for help. Just wondering how this happened… Also documenting this if anyone else runs into this.

{
    return $this->hasMany('App\Models\Storage', 'device_id');
}

#<<<<<<< HEAD
#=======
public function mempools()
{
return $this->hasMany(‘App\Models\Mempool’, ‘device_id’);
}

#>>>>>>> 52ea0a58b337e8740b7b1401c70277f2193abf4c
public function syslogs()

Long Story…

Hi, I moved our LibreNMS to a new Server and I am trying to get it working again. I am getting what looks to be PHP SQL Composer errors with Device.php.

Old Server: Ubuntu 16.04 PHP5
New Server: Ubuntu 18.04 PHP7.2
LibreNMS Updated from 3ce1faa49b to 6966fc1b2a

I note how I moved the code between the two servers.
Validate Passes
Daily has ran and updated the code to the latest and also updated the DB Schema.

Issues

  1. No devices show up in the list but they are in the database. See Error Below
  2. Polling seems broken. Getting the following errors. See Error Below

Poller Error

[2019-02-18 02:30:20] production.ERROR: syntax error, unexpected '<<' (T_SL), expecting function (T_FUNCTION) or const (T_CONST) {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): syntax error, unexpected '<<' (T_SL), expecting function (T_FUNCTION) or const (T_CONST) at /opt/librenms/app/Models/Device.php:589)
[stacktrace]
#0 /opt/librenms/vendor/composer/ClassLoader.php(322): Composer\\Autoload\\includeFile('/opt/librenms/v...')
#1 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('App\\\\Models\\\\Devi...')
#2 /opt/librenms/includes/polling/ospf.inc.php(11): spl_autoload_call('App\\\\Models\\\\Devi...')
#3 /opt/librenms/includes/polling/functions.inc.php(303): include('/opt/librenms/i...')
#4 /opt/librenms/poller.php(157): poll_device(Array, false)
#5 {main}
"} 

Website Devices Page

[2019-02-18 02:41:09] production.ERROR: syntax error, unexpected '<<' (T_SL), expecting function (T_FUNCTION) or const (T_CONST) {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): syntax error, unexpected '<<' (T_SL), expecting function (T_FUNCTION) or const (T_CONST) at /opt/librenms/app/Models/Device.php:589)
[stacktrace]
#0 /opt/librenms/vendor/composer/ClassLoader.php(322): Composer\\Autoload\\includeFile('/opt/librenms/v...')
#1 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('App\\\\Models\\\\Devi...')
#2 /opt/librenms/includes/polling/ospf.inc.php(11): spl_autoload_call('App\\\\Models\\\\Devi...')
#3 /opt/librenms/includes/polling/functions.inc.php(303): include('/opt/librenms/i...')
#4 /opt/librenms/poller.php(157): poll_device(Array, false)
#5 {main}
"} 
[2019-02-18 02:41:09] production.ERROR: syntax error, unexpected '<<' (T_SL), expecting function (T_FUNCTION) or const (T_CONST) {"userId":3,"email":"[email protected]","exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): syntax error, unexpected '<<' (T_SL), expecting function (T_FUNCTION) or const (T_CONST) at /opt/librenms/app/Models/Device.php:589)
[stacktrace]
#0 /opt/librenms/vendor/composer/ClassLoader.php(322): Composer\\Autoload\\includeFile('/opt/librenms/v...')
#1 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('App\\\\Models\\\\Devi...')
#2 /opt/librenms/app/Http/Controllers/Table/DeviceController.php(75): spl_autoload_call('App\\\\Models\\\\Devi...')
#3 /opt/librenms/app/Http/Controllers/Table/TableController.php(51): App\\Http\\Controllers\\Table\\DeviceController->baseQuery(Object(Illuminate\\Http\\Request))
#4 [internal function]: App\\Http\\Controllers\\Table\\TableController->__invoke(Object(Illuminate\\Http\\Request))
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#6 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('__invoke', Array)
#7 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\Table\\DeviceController), '__invoke')
#8 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
#9 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(682): Illuminate\\Routing\\Route->run()
#10 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#11 /opt/librenms/app/Http/Middleware/VerifyTwoFactor.php(38): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#12 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): App\\Http\\Middleware\\VerifyTwoFactor->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#13 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#14 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#15 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#16 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#17 /opt/librenms/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(43): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#18 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Auth\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#19 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#20 /opt/librenms/app/Http/Middleware/LegacySession.php(44): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#21 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): App\\Http\\Middleware\\LegacySession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#22 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#23 /opt/librenms/app/Http/Middleware/LegacyExternalAuth.php(45): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#24 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): App\\Http\\Middleware\\LegacyExternalAuth->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#25 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#26 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(75): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#27 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#28 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#29 /opt/librenms/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#30 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#31 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#32 /opt/librenms/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#33 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#34 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#35 /opt/librenms/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#36 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#37 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#38 /opt/librenms/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#39 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#40 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#41 /opt/librenms/app/Http/Middleware/CheckInstalled.php(46): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#42 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): App\\Http\\Middleware\\CheckInstalled->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#43 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#44 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#45 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(684): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#46 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(659): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#47 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#48 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(614): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#49 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#50 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#51 /opt/librenms/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#52 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#53 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#54 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#55 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#56 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#57 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#58 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#59 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#60 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#61 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#62 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#63 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#64 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#65 /opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#66 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#67 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#68 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#69 /opt/librenms/html/index.php(53): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#70 {main}
"}

#How the LibreNMS was moved.

#On Old server
cd /opt
mysql_dump -u root -p librenms > librenms-2019-02-18.sql
tar cf librenms librenms.2019-02-18.tar

#Copy the files over to the new server

#New Server
[email protected]:/opt# tar xf librenms.2019-02-18.tar

#I did run github-remove -d to clean up some files that didn’t belong

mysql -u root -p < librenms-2019-02-18.sql
Enter password:

#Update the MariaDB granting all privilegs to librenms
[email protected]:/opt/librenms# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1720
Server version: 10.1.38-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04

Copyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]> GRANT ALL PRIVILEGES ON librenms.* TO ‘librenms’@‘localhost’;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]> quit
Bye

Validated that librenms sql user has access to the database and can select data from the users table

[email protected]:~/logs$ mysql -u librenms -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1974
Server version: 10.1.38-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04

Copyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]> use librenms
MariaDB [librenms]> select count() from devices;
±---------+
| count(
) |
±---------+
| 241 |
±---------+
1 row in set (0.00 sec)

#Set the permissions
chown -R librenms:librenms /opt/librenms
setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/

#Ran Validate on the new servers
#--------------------------------
[email protected]:~$ ./validate.php

Component Version
LibreNMS 1.39-83-g3ce1faa49b
DB Schema 251
PHP 7.2.15-0ubuntu0.18.04.1
MySQL 10.1.38-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.8.4
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] You have not set sql_mode=’’ in your mysql config.
[FIX] Set sql-mode=’’ in your mysql config file in the [mysqld] section.
[OK] Database schema correct
[FAIL] The poller (librenms) has not completed within the last 5 minutes, check the cron job.
[FAIL] The poller (Librenms2) has not completed within the last 5 minutes, check the cron job.
[WARN] Some devices have not been polled in the last 5 minutes. You may have performance issues.
[FIX] Check your poll log and see: XXXXXXXXXXXXXXXXX/Support/Performance/
Devices:
208.xxx.222.8
10.249.12.6
10.249.12.78
10.249.12.10
10.249.15.10
10.249.29.10
10.249.28.10
10.249.28.51
10.249.14.10
10.250.1.35
10.250.1.36
172.16.5.10
172.16.5.58
172.16.5.50
172.16.5.52
and 221 more…
[FAIL] Discovery has not completed in the last 24 hours.
[FIX] Check the cron job to make sure it is running and using discovery-wrapper.py
[WARN] Your install is over 24 hours out of date, last update: Tue, 22 May 2018 17:16:17 +0000
[FIX] Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
[email protected]:~$

Since the validate looked good except for the poller in the last 5 mins and sql mode. I ran daily

[email protected]:~$ ./daily.sh
Updating to latest codebase FAIL
sh: 1: /usr/sbin/sendmail: not found

*** Please tell me who you are.

Run

git config --global user.email “XXXXXXXXXXXXXX”
git config --global user.name “Your Name”

to set your account’s default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got ‘librenmsXXXXXXXXX.(none)’)
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

#Fix the git error
[email protected]:~$ git config --global user.email “e*****@**"
[email protected]:~$ git config --global user.name "E

[email protected]:~$ ./daily.sh
Updating to latest codebase OK
Updating Composer packages OK
Updated from 3ce1faa49b to 6966fc1b2a OK
Updating SQL-Schema

OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
[email protected]:~$

#Ran Daily again just to make sure everything was updated… Probably not needed
[email protected]:~$ ./daily.sh
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

#Validated the config
[email protected]:~$ ./validate.php

Component Version
LibreNMS 1.48.1-67-g6966fc1b2a
DB Schema 2019_01_16_195644_add_vrf_id_and_bgpLocalAs (131)
PHP 7.2.15-0ubuntu0.18.04.1
MySQL 10.1.38-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.8.4
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] The poller (librenms) has not completed within the last 5 minutes, check the cron job.
[FAIL] The poller (Librenms2) has not completed within the last 5 minutes, check the cron job.
[WARN] Some devices have not been polled in the last 5 minutes. You may have performance issues.
[FIX]:
Check your poll log and see: XXXXXXXXXXXXXXXXX/Support/Performance/
Devices:
208.40.222.8
10.249.12.6
10.249.12.78
10.249.12.10
10.249.15.10
10.249.29.10
10.249.28.10
10.249.28.51
10.249.14.10
10.250.1.35
10.250.1.36
172.16.5.10
172.16.5.58
172.16.5.50
172.16.5.52
and 221 more…
[FAIL] Discovery has not completed in the last 24 hours.
[FIX]:
Check the cron job to make sure it is running and using discovery-wrapper.py

#Updated Cron
[email protected]:/opt/librenms# vi /etc/cron.d/librenms

Using this cron file requires an additional user on your system, please see install docs.

33 */6 * * * librenms /opt/librenms/cronic /opt/librenms/discovery-wrapper.py 1
*/5 * * * * librenms /opt/librenms/discovery.php -h new >> /dev/null 2>&1
*/5 * * * * librenms /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16

          • librenms /opt/librenms/alerts.php >> /dev/null 2>&1
            */5 * * * * librenms /opt/librenms/poll-billing.php >> /dev/null 2>&1
            01 * * * * librenms /opt/librenms/billing-calculate.php >> /dev/null 2>&1
            */5 * * * * librenms /opt/librenms/check-services.php >> /dev/null 2>&1

Daily maintenance script. DO NOT DISABLE!

If you want to modify updates:

Switch to monthly stable release: XXXXXXXXXXXXXXXdocs.librenms.XXXXXX/General/Releases/

Disable updates: XXXXXXXXXXXXXXXXdocs.librenms.XXXXXXXXXXXX/General/Updating/

15 0 * * * librenms /opt/librenms/daily.sh >> /dev/null 2>&1

#Restart Cron
[email protected]:/opt/librenms# systemctl status cron
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-02-18 02:26:37 CST; 3s ago
Docs: man:cron(8)
Main PID: 13398 (cron)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/cron.service
└─13398 /usr/sbin/cron -f

Feb 18 02:26:37 librenms systemd[1]: Started Regular background program processing daemon.
Feb 18 02:26:37 librenms cron[13398]: (CRON) INFO (pidfile fd = 3)
Feb 18 02:26:37 librenms cron[13398]: (CRON) INFO (Skipping @reboot jobs – not system startup)

Sorry for the multiple posts on this I am a new user to the site and I couldn’t post everything in one go around due to some link limits for new users.

How do i fix git… Do i just do ‘git checkout app/Models/Devices.php’ to fix git saying the file was modified?

[email protected]:~/app/Models$ git status
On branch master
Your branch is ahead of ‘composer/master’ by 3 commits.
(use “git push” to publish your local commits)

Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git checkout – …” to discard changes in working directory)

    modified:   Device.php

no changes added to commit (use “git add” and/or “git commit -a”)

git checkout -- then ./daily.sh again

Not sure how my branch is ahead of the master…

[email protected]:~$ git checkout
M app/Models/Device.php
Your branch is ahead of ‘composer/master’ by 3 commits.
(use “git push” to publish your local commits)

[email protected]:~$ git log | head -n 30
commit 6966fc1b2a6ca67b57864ad739aeafa90b7fa744
Merge: 3ce1faa49b 9dba9f6265
Author: Erik <e*****@*****.com>
Date: Mon Feb 18 02:21:17 2019 -0600

Merge branch 'master' of https://github.com/librenms/librenms

commit 9dba9f626556f73febedd88c57b3382c24fa7f1a
Author: KodApa85 [email protected]
Date: Mon Feb 18 02:07:13 2019 +0000

Netgear m5300 health sensors (#9744)

* ZyXEL XGS4600-32F
- Added mib for diagnostics
    - CPU/Mem
    - Temp/Fan/Voltage
- Updated zyxel group mempools

I was able to get this fixed.

[email protected]:~$ git status
On branch master
Your branch is ahead of ‘composer/master’ by 3 commits.
(use “git push” to publish your local commits)

Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git checkout – …” to discard changes in working directory)

    modified:   app/Models/Device.php

no changes added to commit (use “git add” and/or “git commit -a”)
[email protected]:~$ git checkout
M app/Models/Device.php
Your branch is ahead of ‘composer/master’ by 3 commits.
(use “git push” to publish your local commits)
[email protected]:~$ git branch

  • master
    [email protected]:~$ git checkout app/Models/Device.php
    [email protected]:~$ git status
    On branch master
    Your branch is ahead of ‘composer/master’ by 3 commits.
    (use “git push” to publish your local commits)

nothing to commit, working tree clean