Fixed
Details
Assignee
Marcel FuhrmannMarcel FuhrmannReporter
Marcel FuhrmannMarcel FuhrmannLabels
Components
Affects versions
Priority
Trivial
Details
Details
Assignee
Marcel Fuhrmann
Marcel FuhrmannReporter
Marcel Fuhrmann
Marcel FuhrmannLabels
Components
Affects versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created September 14, 2018 at 7:06 PM
Updated September 17, 2018 at 8:42 AM
Resolved September 17, 2018 at 8:42 AM
I've tried this monitor and I always get an outage with reason:
Err: java.lang.NullPointerException
<service name="ReportSchedulerQueue" interval="60000" user-defined="true" status="off"> <parameter key="driver" value="org.postgresql.Driver"/> <parameter key="url" value="jdbc:postgresql://10.10.6.41:5432/database"/> <parameter key="user" value="USER"/> <parameter key="password" value="PASSWORD"/> <parameter key="query" value="select count(1) from report_schedules where active = true and next_execution < (now() at time zone 'utc' - INTERVAL '4 HOUR');"/> <parameter key="action" value="compare_int"/> <parameter key="operand" value="0"/> <parameter key="operator" value="="/> <parameter key="message" value="Unusual amount of unprocessed reports."/> </service>
Is does not matter if I change the operator like this:
<service name="ReportSchedulerQueue" interval="60000" user-defined="true" status="off"> <parameter key="driver" value="org.postgresql.Driver"/> <parameter key="url" value="jdbc:postgresql://10.10.6.41:5432/database"/> <parameter key="user" value="USER"/> <parameter key="password" value="PASSWORD"/> <parameter key="query" value="select count(1) from report_schedules where active = true and next_execution < (now() at time zone 'utc' - INTERVAL '4 HOUR');"/> <parameter key="action" value="compare_int"/> <parameter key="operand" value="10"/> <parameter key="operator" value=">"/> <parameter key="message" value="Unusual amount of unprocessed reports."/> </service>
I've attached the debug logs and it seems that pollerd doesn't get the exception. But you can see it in the event (also in the log for event creation).
I've tried the example from docs.opennms.org (which I can't access atm to link it here) and it worked without any problems.
So my guess is, that something in my SQL statement breaks the functionality.