Title: [opsview] [9572] Log the full query_host command into opsview-web.log if there is an error picked up
- Revision
- 9572
- Author
- dferguson
- Date
- 2012-07-16 16:19:33 +0100 (Mon, 16 Jul 2012)
Log Message
Log the full query_host command into opsview-web.log if there is an error picked up
Modified Paths
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES 2012-07-16 14:08:37 UTC (rev 9571)
+++ trunk/CHANGES 2012-07-16 15:19:33 UTC (rev 9572)
@@ -15,6 +15,7 @@
Allow ndo.dat to be moved more easily
You can no longer edit a contact's username through the web UI, as this affects 3rd party systems (dashboard, reporting module, Nagvis)
Updated Nagios::Plugin and dependencies
+ Log the full query_host command into opsview-web.log if there is an error picked up
NOTICES:
Opsview Web does not install new monitor packs on start - use install_all_opspacks command line utility
Renamed install_monitor_pack to install_opspack and create_monitor_pack to create_opspack
Modified: trunk/opsview-web/lib/Opsview/Web/Controller/Admin/Host.pm
===================================================================
--- trunk/opsview-web/lib/Opsview/Web/Controller/Admin/Host.pm 2012-07-16 14:08:37 UTC (rev 9571)
+++ trunk/opsview-web/lib/Opsview/Web/Controller/Admin/Host.pm 2012-07-16 15:19:33 UTC (rev 9572)
@@ -348,7 +348,7 @@
# Set credential info here
my $host = $c->stash->{object};
- foreach my $k ( qw(snmp_version snmp_port) ) {
+ foreach my $k (qw(snmp_version snmp_port)) {
$query_host_args->{$k} = $host->$k;
}
$query_host_args->{snmp_auth}->{community} = $host->snmp_community;
@@ -449,8 +449,9 @@
}
my $host_interfaces_config = $c->config->{host_interfaces};
- foreach $_
- ( qw(throughput_critical throughput_warning errors_critical errors_warning discards_critical discards_warning) )
+ foreach $_ (
+ qw(throughput_critical throughput_warning errors_critical errors_warning discards_critical discards_warning)
+ )
{
if ( exists $host_interfaces_config->{"default_$_"} ) {
$query_host_args->{"default_$_"} =
@@ -469,6 +470,7 @@
}
if ( my $err = $reply->{stderr} ) {
+ $c->log->error( "query_host command: @$command" );
$c->log->error( "query_host error: $err" );
$c->stash( error => $c->loc( "messages.queryHost.error: [_1]", $err )
);
_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins