Bug 1975596 - [RFE] Enhancement of RHV monitoring by SNMP to merge each alert message into a single line
Summary: [RFE] Enhancement of RHV monitoring by SNMP to merge each alert message into ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.3.10
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ovirt-4.5.1
: ---
Assignee: Eli Mesika
QA Contact: Guilherme Santos
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-24 02:19 UTC by IRFAN MOMIN
Modified: 2022-08-19 14:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-09 06:40:31 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 IRFAN MOMIN 2021-06-24 02:43:09 UTC
RHV split the alert message (SNMP) into multiple lines which are not supported by monitoring tool.

For Example:

(The second line begins from '.(T2)" ... )

01 Jun 2021 15:03:42:
<rhv_manager_hostname> [MAJOR] Failed to check for available updates on host <hypervisor_name> with message 'Failed to run check-update of host '<hypervisor_name>'. Error: fatal: [<hypervisor_name>]: FAILED! => {""changed"": false, ""msg"": ""Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)."", ""unreachable"": true}
'. (T2)","[ts_event_gateway:1660743]",Snmp_rhv,SNMP_ovirtEngineNotifierNotificationsAudit,CLOSED


How can we merge the alert into a single line?

Comment 10 Eli Mesika 2022-03-02 11:47:26 UTC
Please upgrade to 4.4.10 and retry as we upgraded the SNMP4j library in 4.4.10
then try again and check if this resolved the issue

Comment 11 Sandro Bonazzola 2022-03-29 16:16:40 UTC
We are past 4.5.0 feature freeze, please re-target.

Comment 12 Eli Mesika 2022-06-08 21:53:57 UTC
Can not reproduce on latest master, traps looks fine :

DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (156193) 0:26:01.93	SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.2312.13.1.1.0.1	SNMPv2-SMI::enterprises.2312.13.1.1.2.1.1 = STRING: "215"	SNMPv2-SMI::enterprises.2312.13.1.1.2.1.2 = STRING: "HOST_AVAILABLE_UPDATES_FAILED"	SNMPv2-SMI::enterprises.2312.13.1.1.2.1.3 = INTEGER: 839	SNMPv2-SMI::enterprises.2312.13.1.1.2.1.4 = INTEGER: 2	SNMPv2-SMI::enterprises.2312.13.1.1.2.1.5 = STRING: "Failed to check for available updates on host host with message 'fence-agents-kdump.x86_64, libtevent.x86_64, fence-agents-ilo-mp.noarch, dracut-network.x86_64, python3-psutil.x86_64, binutils.x86_64, fence-agents-apc.noarch, rsyslog-mmnormalize.x86_64, fence-agents-hpblade.noarch, NetworkManager-ovs.x86_64 and 141 others. To see all packages check engine.log.'."	SNMPv2-SMI::enterprises.2312.13.1.1.2.1.6 = INTEGER: 1	SNMPv2-SMI::enterprises.2312.13.1.1.2.1.7 = STRING: "2022-06-09T00:47Z"	SNMPv2-SMI::enterprises.2312.13.1.1.2.1.104 = STRING: "host"	SNMPv2-SMI::enterprises.2312.13.1.1.2.1.105 = STRING: "d0128917-0242-4e48-9bd4-61381bcc33bc"

Database shows that no new lines were involved :

engine_2072626=# select audit_log_id, 
engine_2072626-#          substring(message,1, 50) as message_start, 
engine_2072626-#          strpos ( message, E'\n' ) AS new_line_position, 
engine_2072626-#          substring(message, strpos ( message, E'\n' )) AS substring_after_new_line 
engine_2072626-#   from audit_log 
engine_2072626-#   where strpos ( message, E'\n' ) > 0;
 audit_log_id | message_start | new_line_position | substring_after_new_line 
--------------+---------------+-------------------+--------------------------
(0 rows)


Please upgrade to latest available version and test again

Comment 13 Martin Perina 2022-06-09 06:40:31 UTC
Closing as current release, because we are not able to reproduce in RHV 4.4 SP1. If still reproduced, feel free to reopen and attach relevant logs


Note You need to log in before you can comment on or make changes to this bug.