Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support of new OS for NTP/PTP systems: Meinberg OS, Safran (Orolia), Oscilloquartz (Adva) #15453

Merged
merged 6 commits into from Dec 2, 2023

Conversation

MaxPecc
Copy link
Contributor

@MaxPecc MaxPecc commented Oct 13, 2023

  • support of Meinberg microSync OS (mbg-meinbergos)
  • support of Safran (Orolia) SecureSync OS (orolia-securesync)
  • support of Adva OSA (5401 and 5412) OS (adva_fsp150cm)

Sorry I was not able to generate json data. The command save-test-data.php has generated json with only Avaibility poller data

DO NOT DELETE THE UNDERLYING TEXT

Please note

Please read this information carefully. You can run ./lnms dev:check to check your code before submitting.

  • Have you followed our code guidelines?
  • If my Pull Request does some changes/fixes/enhancements in the WebUI, I have inserted a screenshot of it.
  • If my Pull Request makes discovery/polling/yaml changes, I have added/updated test data.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

- support of Meinberg microSync OS (mbg-meinbergos)
- support of Safran (Orolia) SecureSync OS (orolia-securesync)
- support of Adva OSA (5401 and 5412) OS (adva_fsp150cm)
@murrant murrant added Device 🖥️ New or added device support Needs Tests 🦄 https://docs.librenms.org/Developing/os/Test-Units/ labels Oct 15, 2023
@github-actions
Copy link

Please add test data so we can ensure your change is not broken in the future.
Read the docs to find out how: https://docs.librenms.org/Developing/os/Test-Units

@MaxPecc
Copy link
Contributor Author

MaxPecc commented Oct 16, 2023

Please add test data so we can ensure your change is not broken in the future. Read the docs to find out how: https://docs.librenms.org/Developing/os/Test-Units

Hello,

As mentionned in the commit, the output of ./scripts/save-test-data.php does not contain values expectedt.

In debug, I've an error
SNMP['/usr/bin/snmpget' '-M' '/librenms/application/librenms/mibs' '-m' 'SNMPv2-TC:SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB:NET-SNMP-VACM-MIB' '-v2c' '-c' 'mbg-meinbergos_mbg-meinbergos' '-OQXUte' 'udp:127.1.6.1:1161' 'SNMPv2-MIB::sysObjectID.0']
Exitcode: 1 ["Timeout: No Response from udp:127.1.6.1:1161.\n"]

Please add test data so we can ensure your change is not broken in the future. Read the docs to find out how: https://docs.librenms.org/Developing/os/Test-Units

Hello,

As I've mentionned, the ./scripts/save-test-data.php is not working. In debug I've: Exitcode: 1 ["Timeout: No Response from udp:127.1.6.1:1161.\n"] (also with existing OS):

_./scripts/save-test-data.php -d -n -o fortios
Starting snmpsim listening on 127.1.6.1:1161...
/usr/local/bin/snmpsimd.py --data-dir=/librenms/application/librenms/tests/snmpsim/ --agent-udpv4-endpoint=127.1.6.1:1161 --logging-method=file:/tmp/snmpsimd.log
Pausing 10 seconds to allow snmpsim to initialize...

OS: fortios
Module: all

Updating os_def.cache
SQL[select * from devices where hostname = ? limit 1 ["127.1.6.1"] 0.43ms]

SQL[select * from devices where device_id = ? limit 1 [0] 0.22ms]

SQL[select exists(select * from devices where hostname = ?) as exists ["127.1.6.1"] 0.19ms]

SQL[insert into devices (hostname, version, community, port, disabled, transport, poller_group, os, status_reason, sysName, port_association_mode) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ["127.1.6.1","v2c","fortios",1161,1,"udp",0,"generic","","127.1.6.1",1] 0.23ms]

SQL[insert into eventlog (reference, type, datetime, severity, message, username, device_id) values (?, ?, ?, ?, ?, ?, ?) [null,"system","2023-10-16 09:38:34",3,"Device 127.1.6.1 has been created","",1431] 0.16ms]

Added device: 1431
SQL[select * from devices where device_id = ? limit 1 [1431] 0.24ms]

127.1.6.1 1431 generic SQL[select * from devices_attribs where devices_attribs.device_id = ? and devices_attribs.device_id is not null [1431] 0.2ms]

[FPING] '/usr/sbin/fping' '-4' '-e' '-q' '-c' '3' '-p' '5000' '-t' '7000' '-O' '0' '127.1.6.1'

response: xmt/rcv/%loss = 3/3/0%, min/avg/max = 0.07/0.09/0.1
SNMP['/usr/bin/snmpget' '-M' '/librenms/application/librenms/mibs' '-m' 'SNMPv2-TC:SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB:NET-SNMP-VACM-MIB' '-v2c' '-c' 'fortios' '-OQXUte' 'udp:127.1.6.1:1161' 'SNMPv2-MIB::sysObjectID.0']
Exitcode: 1 ["Timeout: No Response from udp:127.1.6.1:1161.\n"]

Timeout: No Response from udp:127.1.6.1:1161.

SNMP query failed. Exit Code: 1 Empty: true Bad String: Timeout: No Response from udp:127.1.6.1:1161.

SQL[select * from devices where device_id = ? limit 1 [1431] 0.4ms]

SQL[select * from devices_attribs where devices_attribs.device_id in (1431) [] 0.21ms]

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

Component Version
LibreNMS 23.9.1-80-g0540c56d0 (2023-10-12T09:24:27+02:00)
DB Schema 2023_10_07_231037_application_metrics_add_primary_key (262)
PHP 8.1.20
Python 3.6.8
Database MariaDB 10.3.35-MariaDB
RRDTool 1.7.0
SNMP 5.8
===========================================

Starting polling run:

Hostname: 127.1.6.1
ID: 1431
OS: generic
IP: 127.1.6.1

Load poller module availability

1 day : 0%
1 week : 0%
1 month : 0%
1 year : 0%

SNMP: [1/6.02s] MySQL: [19/0.03s]
Runtime for poller module 'availability': 0.0059 seconds with 102696 bytes

Unload poller module availability

Enabled graphs (0):

Start Alerts

End Alerts (0.0056s)

Start Device Groups

End Device Groups (0.0347s)

Polled 127.1.6.1 (1431) in 16.040 seconds <<<
Array
(
[availability] => Array
(
[poller] => Array
(
[availability] => Array
(
[0] => Array
(
[duration] => 86400
[availability_perc] => 0.000000
)

                        [1] => Array
                            (
                                [duration] => 604800
                                [availability_perc] => 0.000000
                            )

                        [2] => Array
                            (
                                [duration] => 2592000
                                [availability_perc] => 0.000000
                            )

                        [3] => Array
                            (
                                [duration] => 31536000
                                [availability_perc] => 0.000000
                            )

                    )

            )

    )

)

@murrant
Copy link
Member

murrant commented Oct 16, 2023

Seems like your snmpsim is broken, check the log /tmp/snmpsimd.log
or run /usr/local/bin/snmpsimd.py --data-dir=/librenms/application/librenms/tests/snmpsim/ --agent-udpv4-endpoint=127.1.6.1:1161

@MaxPecc
Copy link
Contributor Author

MaxPecc commented Oct 16, 2023

/usr/local/bin/snmpsimd.py --data-dir=/librenms/application/librenms/tests/snmpsim/ --agent-udpv4-endpoint=127.1.6.1:1161

Yes I've an error in /tmp/snmpsimd.log:

`
2023-10-16T10:55:37.20 snmpsimd: ERROR Traceback (most recent call last):;
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/lib/python3.9/site-packages/pysnmp/carrier/asyncore/dispatch.py", line 45, in runDispatcher; loop(timeout or self.getTimerResolution(),;
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/lib64/python3.9/asyncore.py", line 207, in loop; poll_fun(timeout, map);
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/lib64/python3.9/asyncore.py", line 188, in poll2; readwrite(obj, flags);
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/lib64/python3.9/asyncore.py", line 123, in readwrite; obj.handle_error();
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/lib64/python3.9/asyncore.py", line 108, in readwrite; obj.handle_read_event();
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/lib64/python3.9/asyncore.py", line 420, in handle_read_event; self.handle_read();
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/lib/python3.9/site-packages/pysnmp/carrier/asyncore/dgram/base.py", line 170, in handle_read; self._cbFun(self, transportAddress, incomingMessage);
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/lib/python3.9/site-packages/pysnmp/carrier/base.py", line 84, in _cbFun; self.__recvCallables[recvId](;
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/lib/python3.9/site-packages/pysnmp/entity/engine.py", line 151, in __receiveMessageCbFun; self.msgAndPduDsp.receiveMessage(;
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/lib/python3.9/site-packages/pysnmp/proto/rfc3412.py", line 291, in receiveMessage; msgVersion = verdec.decodeMessageVersion(wholeMsg);
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/lib/python3.9/site-packages/pysnmp/proto/api/verdec.py", line 15, in decodeMessageVersion; seq, wholeMsg = decoder.decode(;
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/lib/python3.9/site-packages/pyasn1/codec/ber/decoder.py", line 2003, in call; for asn1Object in streamingDecoder:;
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/lib/python3.9/site-packages/pyasn1/codec/ber/decoder.py", line 1918, in iter; for asn1Object in self._singleItemDecoder(;
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/lib/python3.9/site-packages/pyasn1/codec/ber/decoder.py", line 1778, in call; for value in concreteDecoder.valueDecoder(;
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/lib/python3.9/site-packages/pyasn1/codec/ber/decoder.py", line 654, in valueDecoder; for chunk in substrateFun(asn1Object, substrate, length, options):;
2023-10-16T10:55:37.20 snmpsimd: ERROR TypeError: () takes 3 positional arguments but 4 were given;
2023-10-16T10:55:37.20 snmpsimd: ERROR ;During handling of the above exception, another exception occurred:;;
2023-10-16T10:55:37.20 snmpsimd: ERROR Traceback (most recent call last):;
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/bin/snmpsimd.py", line 1466, in ; transportDispatcher.runDispatcher();
2023-10-16T10:55:37.20 snmpsimd: ERROR File "/usr/local/lib/python3.9/site-packages/pysnmp/carrier/asyncore/dispatch.py", line 50, in runDispatcher; raise PySnmpError('poll error: %s' % ';'.join(format_exception(*exc_info())));
2023-10-16T10:55:37.20 snmpsimd: ERROR pysnmp.error.PySnmpError: poll error: Traceback (most recent call last):;; File "/usr/local/lib/python3.9/site-packages/pysnmp/carrier/asyncore/dispatch.py", line 45, in runDispatcher; loop(timeout or self.getTimerResolution(),;; File "/usr/lib64/python3.9/asyncore.py", line 207, in loop; poll_fun(timeout, map);; File "/usr/lib64/python3.9/asyncore.py", line 188, in poll2; readwrite(obj, flags);; File "/usr/lib64/python3.9/asyncore.py", line 123, in readwrite; obj.handle_error();; File "/usr/lib64/python3.9/asyncore.py", line 108, in readwrite; obj.handle_read_event();; File "/usr/lib64/python3.9/asyncore.py", line 420, in handle_read_event; self.handle_read();; File "/usr/local/lib/python3.9/site-packages/pysnmp/carrier/asyncore/dgram/base.py", line 170, in handle_read; self._cbFun(self, transportAddress, incomingMessage);; File "/usr/local/lib/python3.9/site-packages/pysnmp/carrier/base.py", line 84, in _cbFun; self.__recvCallables[recvId](;; File "/usr/local/lib/python3.9/site-packages/pysnmp/entity/engine.py", line 151, in __receiveMessageCbFun; self.msgAndPduDsp.receiveMessage(;; File "/usr/local/lib/python3.9/site-packages/pysnmp/proto/rfc3412.py", line 291, in receiveMessage; msgVersion = verdec.decodeMessageVersion(wholeMsg);; File "/usr/local/lib/python3.9/site-packages/pysnmp/proto/api/verdec.py", line 15, in decodeMessageVersion; seq, wholeMsg = decoder.decode(;; File "/usr/local/lib/python3.9/site-packages/pyasn1/codec/ber/decoder.py", line 2003, in call; for asn1Object in streamingDecoder:;; File "/usr/local/lib/python3.9/site-packages/pyasn1/codec/ber/decoder.py", line 1918, in iter; for asn1Object in self._singleItemDecoder(;; File "/usr/local/lib/python3.9/site-packages/pyasn1/codec/ber/decoder.py", line 1778, in call; for value in concreteDecoder.valueDecoder(;; File "/usr/local/lib/python3.9/site-packages/pyasn1/codec/ber/decoder.py", line 654, in valueDecoder; for chunk in substrateFun(asn1Object, substrate, length, options):;;TypeError: () takes 3 positional arguments but 4 were given;caused by <class 'TypeError'>: () takes 3 positional arguments but 4 were given;

`

If you've any idea ?

@MaxPecc
Copy link
Contributor Author

MaxPecc commented Oct 19, 2023

Seems like your snmpsim is broken, check the log /tmp/snmpsimd.log or run /usr/local/bin/snmpsimd.py --data-dir=/librenms/application/librenms/tests/snmpsim/ --agent-udpv4-endpoint=127.1.6.1:1161

I've found the error. It's due to 0.5.0 pyasn1 version. I've downgraded the version in 0.4.8 and I've no errors now.
I've commited json data

@murrant murrant removed the Needs Tests 🦄 https://docs.librenms.org/Developing/os/Test-Units/ label Nov 2, 2023
Copy link
Contributor

@PipoCanaja PipoCanaja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PipoCanaja PipoCanaja merged commit afb7a61 into librenms:master Dec 2, 2023
8 checks passed
@librenms-bot
Copy link

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/24-1-0-changelog/23271/1

gunkaaa pushed a commit to gunkaaa/librenms that referenced this pull request Jan 8, 2024
…lia), Oscilloquartz (Adva) (librenms#15453)

* Added support of new OS for NTP/PTP systems:
- support of Meinberg microSync OS (mbg-meinbergos)
- support of Safran (Orolia) SecureSync OS (orolia-securesync)
- support of Adva OSA (5401 and 5412) OS (adva_fsp150cm)

* Fix Safran (Orolia) images

* Added Test-unit JSON files

* Changed SVG images

* Changed SVG images

* Changed SVG images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Device 🖥️ New or added device support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants