<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[nxshell - Database failure on eventlog query]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I figured this belongs in a different topic. I am trying to query the event log, and am instead getting a Databaase Failure error of the following:</p>
<pre><code>Traceback (most recent call last):
  File "nxshell_eventcounter.py", line 8, in &lt;module&gt;
    eventLog.query(logFilter)
	at org.netxms.client.NXCSession.waitForRCC(NXCSession.java:1536)
	at org.netxms.client.log.Log.query(Log.java:121)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)

org.netxms.client.NXCException: org.netxms.client.NXCException: Database failure
</code></pre>
<p dir="auto">Any thoughts? I'm worried the Columfilter is being set incorrectly. My eventual goal is to use a column filter to query events only of a certain severity, but I figured I would start easy. My code is reproduced below:</p>
<pre><code>eventLog = session.openServerLog("EventLog")

columnFilter = ColumnFilter(ColumnFilter.EQUALS,8153)
logFilter = LogFilter()
logFilter.setColumnFilter("Source",columnFilter)

eventLog.query(logFilter)

table = eventLog.retrieveData(0,2)
</code></pre>
<p dir="auto">Thanks,<br />
Zach</p>
]]></description><link>https://forum.netxms.org/topic/4537/nxshell-database-failure-on-eventlog-query</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:28:43 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/4537.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Jun 2016 16:05:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to nxshell - Database failure on eventlog query on Tue, 21 Jun 2016 14:27:46 GMT]]></title><description><![CDATA[<p dir="auto">Hey, thanks! That works perfectly. Thanks again for all your work + help!</p>
<p dir="auto">Have a good one,<br />
Zach</p>
]]></description><link>https://forum.netxms.org/post/20205</link><guid isPermaLink="true">https://forum.netxms.org/post/20205</guid><dc:creator><![CDATA[zshnet]]></dc:creator><pubDate>Tue, 21 Jun 2016 14:27:46 GMT</pubDate></item><item><title><![CDATA[Reply to nxshell - Database failure on eventlog query on Tue, 21 Jun 2016 09:21:51 GMT]]></title><description><![CDATA[<p dir="auto">I found problem. It's bad class declaration. You want function "public ColumnFilter(int type, long value)" to be used, but both values are counted like long and class is created like: "public ColumnFilter(long rangeFrom, long rangeTo)". So your values were counted like a range. Type should be change to Enum type. I have created bug on it: <a href="https://dev.raden.solutions/issues/1245" rel="nofollow ugc">https://dev.raden.solutions/issues/1245</a>.<br />
Temporary solution:<br />
import java.lang.Integer<br />
eventLog = session.openServerLog("EventLog")</p>
<p dir="auto">columnFilter = ColumnFilter(java.lang.Integer(ColumnFilter.EQUALS),363)<br />
logFilter = LogFilter()<br />
logFilter.setColumnFilter("event_id",columnFilter)<br />
...</p>
]]></description><link>https://forum.netxms.org/post/20202</link><guid isPermaLink="true">https://forum.netxms.org/post/20202</guid><dc:creator><![CDATA[zev]]></dc:creator><pubDate>Tue, 21 Jun 2016 09:21:51 GMT</pubDate></item><item><title><![CDATA[Reply to nxshell - Database failure on eventlog query on Mon, 20 Jun 2016 17:55:39 GMT]]></title><description><![CDATA[<p dir="auto">For some quick information, I chose this event because it was not filtering on event_severity, so I gave ID a try, and it seems to similarly not work. I have pasted the event below, so that you can see it exists.</p>
<p dir="auto">27628	19.05.2016 11:56:32	Karmaloop-R1	0	SYS_NODE_CRITICAL	Critical	Node status changed to CRITICAL		0</p>
]]></description><link>https://forum.netxms.org/post/20196</link><guid isPermaLink="true">https://forum.netxms.org/post/20196</guid><dc:creator><![CDATA[zshnet]]></dc:creator><pubDate>Mon, 20 Jun 2016 17:55:39 GMT</pubDate></item><item><title><![CDATA[Reply to nxshell - Database failure on eventlog query on Mon, 20 Jun 2016 17:53:42 GMT]]></title><description><![CDATA[<p dir="auto">One last question, I hope! It appears to not be filtering anything. Running the following code, I get five events, 10, 11, 12, 13, 109. The filter should have spat out 27628, right? If I pull the columnfilter from the logfilter, I get that the filter is still in place, but I don't seem to get any filtering. Any guesses?</p>
<pre><code>eventLog = session.openServerLog("EventLog")

columnFilter = ColumnFilter(ColumnFilter.EQUALS,27628)
columnFilter.setNumericValue(27628)
logFilter = LogFilter()
logFilter.setColumnFilter("event_id",columnFilter)
#print(columnFilter.getNumericValue())
#print(columnFilter.getOperation())
fill = logFilter.getColumnFilter("event_id")
print(fill.getNumericValue())
eventLog.query(logFilter)

table = eventLog.retrieveData(0,5)
for j in range(table.getRowCount()):
    #for i in range(table.getColumnCount()):
    print(table.getColumnDisplayName(0))
    print(table.getCellValue(j,0))
</code></pre>
<p dir="auto">output is:<br />
27628 [output of fill.getNumericValue()]<br />
event_id<br />
10<br />
event_id<br />
11<br />
event_id<br />
12<br />
event_id<br />
13<br />
event_id<br />
109</p>
]]></description><link>https://forum.netxms.org/post/20195</link><guid isPermaLink="true">https://forum.netxms.org/post/20195</guid><dc:creator><![CDATA[zshnet]]></dc:creator><pubDate>Mon, 20 Jun 2016 17:53:42 GMT</pubDate></item><item><title><![CDATA[Reply to nxshell - Database failure on eventlog query on Mon, 20 Jun 2016 17:03:44 GMT]]></title><description><![CDATA[<p dir="auto">The name is "event_source". UI is hiding column real names. You should use names that are defined in database.</p>
]]></description><link>https://forum.netxms.org/post/20194</link><guid isPermaLink="true">https://forum.netxms.org/post/20194</guid><dc:creator><![CDATA[zev]]></dc:creator><pubDate>Mon, 20 Jun 2016 17:03:44 GMT</pubDate></item><item><title><![CDATA[Reply to nxshell - Database failure on eventlog query on Mon, 20 Jun 2016 16:59:35 GMT]]></title><description><![CDATA[<p dir="auto">That was it! I looked in the postgresql log:</p>
<p dir="auto">2016-06-20 12:37:31 EDT ERROR:  column "source" does not exist at character 159<br />
2016-06-20 12:37:31 EDT STATEMENT:  SELECT event_id,event_timestamp,event_source,dci_id,event_code,event_severity,event_message,user_tag,root_event_id FROM event_log WHERE event_id&lt;=934558 AND (Source BETWEEN 0 AND 8153) LIMIT 1000</p>
<p dir="auto">I guess the column isn't named Source? I'll have to look in the postgresql database to see what's there, unless you have a better idea of the column name.</p>
<p dir="auto">Thanks,<br />
Zach</p>
]]></description><link>https://forum.netxms.org/post/20193</link><guid isPermaLink="true">https://forum.netxms.org/post/20193</guid><dc:creator><![CDATA[zshnet]]></dc:creator><pubDate>Mon, 20 Jun 2016 16:59:35 GMT</pubDate></item><item><title><![CDATA[Reply to nxshell - Database failure on eventlog query on Mon, 20 Jun 2016 16:52:08 GMT]]></title><description><![CDATA[<p dir="auto">Good to know. We're currently running really hard on Debug levels, I think. The only relevant line I could find in any of the five (netxmsd.0/1/2/3/4) logfiles was this:<br />
[20-Jun-2016 12:31:54.204] [DEBUG] [CLSN-4] User <a href="mailto:robot_dci_disenable_fix_icmp_polling@69.46.234.228" rel="nofollow ugc">robot_dci_disenable_fix_icmp_polling@69.46.234.228</a> authenticated (language=en clientInfo="nxjclient/2.0.3 (Linux 3.19.0-58-generic; libnxcl 2.0.3)")</p>
<p dir="auto">Our debug level is currently at 6. We have a million of these messages:<br />
[20-Jun-2016 12:31:54.245] [DEBUG] [CLSN-4] Sending message CMD_OBJECT</p>
<p dir="auto">which is making it a bit hard to read through the logs. Searching for "database" "nxc" or similar terms got me nothing. Any guesses? Should I try to dig into the postgresql logs?</p>
<p dir="auto">Thanks,<br />
Zach</p>
]]></description><link>https://forum.netxms.org/post/20192</link><guid isPermaLink="true">https://forum.netxms.org/post/20192</guid><dc:creator><![CDATA[zshnet]]></dc:creator><pubDate>Mon, 20 Jun 2016 16:52:08 GMT</pubDate></item><item><title><![CDATA[Reply to nxshell - Database failure on eventlog query on Mon, 20 Jun 2016 16:37:56 GMT]]></title><description><![CDATA[<p dir="auto">Optimal log level for debugging problems is 6.</p>
]]></description><link>https://forum.netxms.org/post/20191</link><guid isPermaLink="true">https://forum.netxms.org/post/20191</guid><dc:creator><![CDATA[zev]]></dc:creator><pubDate>Mon, 20 Jun 2016 16:37:56 GMT</pubDate></item><item><title><![CDATA[Reply to nxshell - Database failure on eventlog query on Mon, 20 Jun 2016 16:32:20 GMT]]></title><description><![CDATA[<p dir="auto">Check "LogFile" parameter in server config(NETXMSHOME/etc/netxmsd.conf or /etc/netxmsd.conf). If it is not defined try to check something like /var/log/netxmsd.</p>
]]></description><link>https://forum.netxms.org/post/20190</link><guid isPermaLink="true">https://forum.netxms.org/post/20190</guid><dc:creator><![CDATA[zev]]></dc:creator><pubDate>Mon, 20 Jun 2016 16:32:20 GMT</pubDate></item><item><title><![CDATA[Reply to nxshell - Database failure on eventlog query on Mon, 20 Jun 2016 16:24:03 GMT]]></title><description><![CDATA[<p dir="auto">I looked at it once but I can't seem to remember where the log file should be located on Linux. Any suggestions as to where I could look?</p>
<p dir="auto">Thanks,<br />
Zach</p>
]]></description><link>https://forum.netxms.org/post/20189</link><guid isPermaLink="true">https://forum.netxms.org/post/20189</guid><dc:creator><![CDATA[zshnet]]></dc:creator><pubDate>Mon, 20 Jun 2016 16:24:03 GMT</pubDate></item><item><title><![CDATA[Reply to nxshell - Database failure on eventlog query on Mon, 20 Jun 2016 16:14:37 GMT]]></title><description><![CDATA[<p dir="auto">Check your server log on debug level 4. There should be something like: "LOG QUERY: %s"</p>
]]></description><link>https://forum.netxms.org/post/20188</link><guid isPermaLink="true">https://forum.netxms.org/post/20188</guid><dc:creator><![CDATA[zev]]></dc:creator><pubDate>Mon, 20 Jun 2016 16:14:37 GMT</pubDate></item></channel></rss>