UNKNOWN: Encountered unexpected response/output from the ser

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

UNKNOWN: Encountered unexpected response/output from the ser

Postby jcamillo » Wed Jan 09, 2013 11:11 am

I have a new check that I stated using. I was able to setup one successfully and then I copied it to create more of the same check. When I test the new ones they work from the command line on the nagios server to the client server.

I get the following results:
UNKNOWN: Encountered unexpected response/output from the server/remote script. Response = [ ].


Here is the check I am running

logrobot autofig /opt/jboss/jboss-as/server/production/log/server.log 60m 'INFO' '.' 1 2 -show

This works from the CLI.

Is there expanding logging I can look at to find out what is causing the problem.
jcamillo
 
Posts: 29
Joined: Wed Jan 04, 2012 8:52 am

Re: UNKNOWN: Encountered unexpected response/output from the

Postby slansing » Wed Jan 09, 2013 11:16 am

Is this a return you are getting on the web UI or the CLI? How do you have your remote version of the command set up? What are you passing through the CLI to hit the remote system?
User avatar
slansing
The Good Cop
 
Posts: 7155
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: UNKNOWN: Encountered unexpected response/output from the

Postby jcamillo » Wed Jan 09, 2013 11:45 am

I am getting this on the GUI:

UNKNOWN: Encountered unexpected response/output from the server/remote script. Response = [ ].

Here is what I have on the GUI - logrobot autofig /opt/jboss/jboss-as/server/production/log/server.log 60m 'INFO' '.' 1 2 -show

I am using the same line on the CLI:

logrobot autofig /opt/jboss/jboss-as/server/production/log/server.log 60m 'INFO' '.' 1 2 -show
jcamillo
 
Posts: 29
Joined: Wed Jan 04, 2012 8:52 am

Re: UNKNOWN: Encountered unexpected response/output from the

Postby scottwilkerson » Thu Jan 10, 2013 11:30 am

Can we run the command as the nagios user to make sure it isn't a permissions thing
Code: Select all
su nagios -c "logrobot autofig /opt/jboss/jboss-as/server/production/log/server.log 60m 'INFO' '.' 1 2 -show"

You may also want to try the full path to logrobot
ie
Code: Select all
su nagios -c "/full/path/to/logrobot autofig /opt/jboss/jboss-as/server/production/log/server.log 60m 'INFO' '.' 1 2 -show"



Also, as the command gets executed without environment variables, I would make sure the program doesn't use any.
User avatar
scottwilkerson
 
Posts: 5882
Joined: Tue Nov 15, 2011 3:11 pm
Location: Product Development Manager

Re: UNKNOWN: Encountered unexpected response/output from the

Postby jcamillo » Thu Jan 10, 2013 3:08 pm

From the CLI - this works -
su nagios -c "logrobot autofig /opt/jboss/jboss-as/server/production/log/server.log 60m 'INFO' '.' 1 2 -show"

Adding the full path does not make a difference.
jcamillo
 
Posts: 29
Joined: Wed Jan 04, 2012 8:52 am

Re: UNKNOWN: Encountered unexpected response/output from the

Postby scottwilkerson » Thu Jan 10, 2013 3:16 pm

Are you running the commands in the CLI on the XI server or on a remote server?

I'm not familiar with logrobot, but from this page
http://www.unixautomation.com/unix-log-file-monitor-analysis.htm

there is reference to setting up the command like this
Code: Select all
define command {
                         command_name         NagiosLogMonitor
                         command_line            $USER1$/NagiosLogMonitor $HOSTNAME$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ '$ARG5$' '$ARG6$' $ARG7$ $ARG8$ $ARG9$ $ARG10$
}


Do you have a plugin called NagiosLogMonitor ?
User avatar
scottwilkerson
 
Posts: 5882
Joined: Tue Nov 15, 2011 3:11 pm
Location: Product Development Manager

Re: UNKNOWN: Encountered unexpected response/output from the

Postby jcamillo » Fri Jan 11, 2013 11:57 am

Here is the full command from the CLI



-bash-4.1# ./NagiosLogMonitor 10.2.40.246:5444 logrobot autofig /opt/jboss/jboss-as/server/production/log/server.log 60m 'INFO' '.' 1 2 -show
CRITICAL: [ 1612 ] instance(s) of [ INFO.*. ] found in log [ /opt/jboss/jboss-as/server/production/log/server.log ]. Time frame scanned: [ (2013-01-11)-(10:58) ] to [ (2013-01-11)-(11:55) ]. [ 0 ] records found for date / time [ (2013-01-11)-(10:56) ]. [ (2013-01-11)-(10:58) ] is closest date / time found. OUTPUT: [ 2013-01-11 11:54:41,483 INFO [com.ice.common.service.impl.ItemService] (Sched1_Worker-1) updateInventory_sellable LastUpdatedTS:2013-01-11 10:35:00.278 Batch Total count:6460 Updated count:6460 LastUpdatedTS:2013-01-11 10:35:00.278
2013-01-11 11:54:41,483 INFO [com.ice.store.stateless.ItemStateless] (Sched1_Worker-1) updateInventorySellableJob called lastUpdatedTS=2013-01-11 10:35:00.278
2013-01-11 11:55:00,017 INFO [com.ice.store.stateless.OpenBravoIntegrationClientStateless] (Sched1_Worker-1) Running submitOpenBravoItemSubs
2013-01-11 11:55:00,019 INFO [com.ice.store.stateless.ItemStateless] (Sched1_Worker-2) Running updateInventorySellableJob
2013-01-11 11:55:00,019 INFO [com.ice.common.service.impl.ItemService] (Sched1_Worker-2) Starting updateInventory_sellable
2013-01-11 11:55:00,019 INFO [com.ice.store.stateless.OpenBravoIntegrationClientStateless] (Sched1_Worker-0) Running submitUpdateOrderBatchToOpenBravo
2013-01-11 11:55:00,019 INFO [com.ice.common.util.IceUtil] (Sched1_Worker-2) updateInventory_sellable LastUpdatedTS:2013-01-11 10:45:02.121 Start: 2013-01-11 11:55:00.19
2013-01-11 11:55:00,086 INFO [com.ice.store.stateless.OpenBravoIntegrationClientStateless] (Sched1_Worker-0) Processing submitUpdateOrderBatchToOpenBravo size: 0
2013-01-11 11:55:00,252 INFO [com.ice.store.stateless.OpenBravoIntegrationClientStateless] (Sched1_Worker-1) Processing submitOpenBravoItemSubs size: 0
2013-01-11 11:55:11,632 INFO [com.ice.common.util.IceUtil] (Sched1_Worker-2) updateInventory_sellable LastUpdatedTS:2013-01-11 10:45:02.121 Start: 2013-01-11 11:55:00.19 End: 2013-01-11 11:55:11.632 Took: 11613ms(11.613sec)(0.19355min)
2013-01-11 11:55:11,632 INFO [com.ice.common.service.impl.ItemService] (Sched1_Worker-2) updateInventory_sellable LastUpdatedTS:2013-01-11 10:45:02.121 Batch Total count:6460 Updated count:1000
2013-01-11 11:55:22,274 INFO [com.ice.common.util.IceUtil] (Sched1_Worker-2) updateInventory_sellable LastUpdatedTS:2013-01-11 10:45:02.121 Start: 2013-01-11 11:55:00.19 End: 2013-01-11 11:55:22.274 Took: 22255ms(22.255sec)(0.3709166666666667min)
2013-01-11 11:55:22,274 INFO [com.ice.common.service.impl.ItemService] (Sched1_Worker-2) updateInventory_sellable LastUpdatedTS:2013-01-11 10:45:02.121 Batch Total count:6460 Updated count:2000

2---60---1612---(2013-01-11)-(10:56)---(2013-01-11)-(11:55)---ETWNFILF---(2013-01-11)-(10:58)---(2013-01-11)-(11:55) NAGCU ].
-bash-4.1#
-bash-4.1#
jcamillo
 
Posts: 29
Joined: Wed Jan 04, 2012 8:52 am

Re: UNKNOWN: Encountered unexpected response/output from the

Postby scottwilkerson » Fri Jan 11, 2013 4:33 pm

This helps.

Can you post the command as you have it setup in XI?

does the command string have the port in it?

I noticed you are running
Code: Select all
10.2.40.246:5444
User avatar
scottwilkerson
 
Posts: 5882
Joined: Tue Nov 15, 2011 3:11 pm
Location: Product Development Manager

Re: UNKNOWN: Encountered unexpected response/output from the

Postby jcamillo » Mon Jan 14, 2013 9:50 am

Command* NagiosLogMonitor

Command line* $USER1$/NagiosLogMonitor $HOSTNAME$:5444 $ARG1$ $ARG2$ $ARG3$ $ARG4$ '$ARG5$' '$ARG6$' $ARG7$ $ARG8$ $ARG9$ $ARG10$
jcamillo
 
Posts: 29
Joined: Wed Jan 04, 2012 8:52 am

Re: UNKNOWN: Encountered unexpected response/output from the

Postby scottwilkerson » Mon Jan 14, 2013 1:09 pm

One last thing, I see the doc uses $HOSTNAME$ in the command which will work if and only if the host_name in XI has resolution.

You may want to switch this to $HOSTADDRESS$
User avatar
scottwilkerson
 
Posts: 5882
Joined: Tue Nov 15, 2011 3:11 pm
Location: Product Development Manager

Next

Return to Nagios XI

Who is online

Users browsing this forum: MichielvM and 4 guests