I am adding a new OS type and added this files
- ./html/images/os/cros.svg
- ./html/images/logos/cros.svg
- ./includes/definitions/discovery/cdot_cros.yaml
- ./includes/definitions/cdot_cros.yaml
Running ./discovery.php -d -h <ip>
manually or from browser debug works (i.e. I can see new logo and serial number etc).
However they get overwritten after sometime automatically with event logs of the form
2022-03-07 19:58:07 Serial: TBRV01-177C:006 ->
2022-03-07 19:58:07 Hardware: CRDT-100-S01 ->
2022-03-07 19:58:07 OS Version: CROS-S-1.0.2 #266 (base:6021) (Mon Mar 7 06:59:48 IST 2022) ->
2022-03-07 19:58:07 Device type: network -> server
2022-03-07 19:58:07 Device OS: cdot_cros -> generic
2022-03-07 19:58:07 Device OS changed: cdot_cros -> generic
Somehow I think I am missing addition in some other files to make my changes persistent. Any help is appreciated.
Validate.php output
bash-5.1# su librenms
/opt/librenms $ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 22.2.1
DB Schema | 2021_25_01_0129_isis_adjacencies_nullable (234)
PHP | 7.4.28
Python | 3.9.7
MySQL | 10.4.14-MariaDB-1:10.4.14+maria~focal
RRDTool | 1.7.2
SNMP | 5.9.1
====================================
[OK] Installed from the official Docker image; no Composer required
[OK] Database connection successful
[FAIL] Database: incorrect column (notifications/datetime)
[FAIL] Database: incorrect column (users/created_at)
[FAIL] We have detected that your database schema may be wrong
[FIX]:
Run the following SQL statements to fix it
SQL Statements:
SET TIME_ZONE='+00:00';
ALTER TABLE `notifications` CHANGE `datetime` `datetime` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00' ;
ALTER TABLE `users` CHANGE `created_at` `created_at` timestamp NOT NULL DEFAULT '1970-01-02 00:00:01' ;
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[WARN] Updates are managed through the official Docker image
Discovery.php o/p: Untitled - LibreNMS
Poller o/p: Untitled - LibreNMS