NETWAYS / icinga2-scom-connector

UNSUPPORTED - SCOM Alert connector for Icinga 2
GNU General Public License v2.0
2 stars 0 forks source link

Errors in scom connector (DB Query and RegEx for date), Patch included #4

Open log1-c opened 7 years ago

log1-c commented 7 years ago

Hi there,

while trying out the scom connector we experienced two errors. Those errors happened with the commit 34ab22a

  1. ERROR:
    ./scom_connector monitor -d
    UNKNOWN - Icinga is currently reloading data into IDO. We can not work at that point!

Workaround: remove _OR program_endtime > 0 from $QUERY_ICINGA_CONFIGDUMP in line 235:

my $QUERY_ICINGA_CONFIGDUMP = "
SELECT count(*) FROM icinga_programstatus
WHERE config_dump_in_progress > 0
";

It seems like _program_endtime is never 0, thus this line was removed

  1. ERROR: UNKNOWN - program ended unexcepted: Could not parse timestamp 'Jul 6 2017 12:42' at ./scom_connector line 463

Used RegEx does not fit the given date.

Workaround:

Change regex in line 457 from m/^(\w+) ([\s\d]{2}) (\d{4}) (\d\d:\d\d:\d\d):/) to m/^(\w+) ([\s\d]{2}) (\d{4}) (\d\d:\d\d)/)

Added a patch file as attachment. scom_connector.zip

Tested with Icinga2 2.6.3 and SCOM 2016 7.2.11878.0 on Windows Server 2016