Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #6474] Column 'host_name' does not exist in table 'hosts' #1680

Closed
icinga-migration opened this issue Jun 12, 2014 · 6 comments
Labels
area/livestatus Legacy interface bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/6474

Created by mopp on 2014-06-12 07:38:11 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2014-06-12 10:05:03 +00:00)
Target Version: 2.0.0
Last Update: 2014-09-16 09:14:49 +00:00 (in Redmine)

Icinga Version: 2.0.0

NagVis runs the query:

GET hosts
Columns: state plugin_output alias display_name address notes last_check next_check state_type current_attempt max_check_attempts last_state_change last_hard_state_change statusmap_image perf_data acknowledged scheduled_downtime_depth has_been_checked name check_command custom_variable_names custom_variable_values
Filter: host_name = TEST123
OutputFormat: json
KeepAlive: on
ResponseHeader: fixed16

Result:

452        2228
/usr/src/packages/BUILD/icinga2-abuild/components/livestatus/table.cpp(96): Throw in function icinga::Column icinga::Table::GetColumn(const icinga::String&) const
Dynamic exception type: boost::exception_detail::clone_impl >
std::exception::what: Column 'host_name' does not exist in table 'hosts'.
[icinga::StackTrace*] =
        (0) libbase.so: void boost::exception_detail::throw_exception_(std::invalid_argument const&, char const*, char const*, int) (+0x2c8) [0x7fee8476e648] (??:0)
        (1) liblivestatus.so: icinga::Table::GetColumn(icinga::String const&) const (+0x110) [0x7fee7dfb9210] (??:0)
        (2) liblivestatus.so: icinga::AttributeFilter::Apply(boost::shared_ptr const&, icinga::Value const&) (+0x47) [0x7fee7df18397] (??:0)
        (3) liblivestatus.so: icinga::AndFilter::Apply(boost::shared_ptr const&, icinga::Value const&) (+0x3f) [0x7fee7df17cbf] (??:0)
        (4) liblivestatus.so: icinga::Table::FilteredAddRow(std::vector >&, boost::shared_ptr const&, icinga::Value const&) (+0x90) [0x7fee7dfbaf10] (??:0)
        (5) liblivestatus.so: icinga::HostsTable::FetchRows(boost::function const&) (+0x879) [0x7fee7df5d389] (??:0)
        (6) liblivestatus.so: icinga::Table::FilterRows(boost::shared_ptr const&) (+0x31c) [0x7fee7dfb9cbc] (??:0)
        (7) liblivestatus.so: icinga::LivestatusQuery::ExecuteGetHelper(boost::shared_ptr const&) (+0xf3) [0x7fee7df6ca43] (??:0)
        (8) liblivestatus.so: icinga::LivestatusQuery::Execute(boost::shared_ptr const&) (+0x98) [0x7fee7df6dec8] (??:0)
        (9) liblivestatus.so: icinga::LivestatusListener::ClientHandler(boost::shared_ptr const&) (+0x292) [0x7fee7df62d92] (??:0)
        (10) libbase.so: icinga::ThreadPool::WorkerThread::ThreadProc(icinga::ThreadPool::Queue&) (+0x444) [0x7fee847bc394] (??:0)
        (11) libboost_thread.so.1.54.0:  (+0xd5e3) [0x7fee853065e3] (??:?)
        (12) libpthread.so.0:  (+0x77f6) [0x7fee829db7f6] (??:?)
        (13) libc.so.6: clone (+0x6d) [0x7fee82ed509d] (??:?)


[icinga::ContextTrace*] =

If you run the same query without "Filter: host_name" it will return the requested data for all hosts.

Changesets

2014-06-12 09:59:21 +00:00 by (unknown) 627f96d

Livestatus: Add 'host_name' and 'service_description' columns for NagVis

These columns are used for filtering and seem to be not documented nor
supported. Only added for compatibility reasons.

fixes #6474
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-06-12 07:56:49 +00:00

Hm. Does it work with 'name'?

@icinga-migration
Copy link
Author

Updated by mopp on 2014-06-12 08:00:26 +00:00

"Filter: host = TEST123", returns almost the same error:

/usr/src/packages/BUILD/icinga2-abuild/components/livestatus/table.cpp(96): Throw in function icinga::Column icinga::Table::GetColumn(const icinga::String&) const
Dynamic exception type: boost::exception_detail::clone_impl >
std::exception::what: Column 'host' does not exist in table 'hosts'.
[icinga::StackTrace*] =
        (0) libbase.so: void boost::exception_detail::throw_exception_(std::invalid_argument const&, char const*, char const*, int) (+0x2c8) [0x7fee8476e648] (??:0)
        (1) liblivestatus.so: icinga::Table::GetColumn(icinga::String const&) const (+0x110) [0x7fee7dfb9210] (??:0)
        (2) liblivestatus.so: icinga::AttributeFilter::Apply(boost::shared_ptr const&, icinga::Value const&) (+0x47) [0x7fee7df18397] (??:0)
        (3) liblivestatus.so: icinga::AndFilter::Apply(boost::shared_ptr const&, icinga::Value const&) (+0x3f) [0x7fee7df17cbf] (??:0)
        (4) liblivestatus.so: icinga::Table::FilteredAddRow(std::vector >&, boost::shared_ptr const&, icinga::Value const&) (+0x90) [0x7fee7dfbaf10] (??:0)
        (5) liblivestatus.so: icinga::HostsTable::FetchRows(boost::function const&) (+0x879) [0x7fee7df5d389] (??:0)
        (6) liblivestatus.so: icinga::Table::FilterRows(boost::shared_ptr const&) (+0x31c) [0x7fee7dfb9cbc] (??:0)
        (7) liblivestatus.so: icinga::LivestatusQuery::ExecuteGetHelper(boost::shared_ptr const&) (+0xf3) [0x7fee7df6ca43] (??:0)
        (8) liblivestatus.so: icinga::LivestatusQuery::Execute(boost::shared_ptr const&) (+0x98) [0x7fee7df6dec8] (??:0)
        (9) liblivestatus.so: icinga::LivestatusListener::ClientHandler(boost::shared_ptr const&) (+0x292) [0x7fee7df62d92] (??:0)
        (10) libbase.so: icinga::ThreadPool::WorkerThread::ThreadProc(icinga::ThreadPool::Queue&) (+0x444) [0x7fee847bc394] (??:0)
        (11) libboost_thread.so.1.54.0:  (+0xd5e3) [0x7fee853065e3] (??:?)
        (12) libpthread.so.0:  (+0x77f6) [0x7fee829db7f6] (??:?)
        (13) libc.so.6: clone (+0x6d) [0x7fee82ed509d] (??:?)


[icinga::ContextTrace*] =

@icinga-migration
Copy link
Author

Updated by mopp on 2014-06-12 08:02:11 +00:00

It will work with "Filter: name = TEST123".

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-06-12 08:33:50 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 2.0.0

Ok. Sounds like an ugly protocol bug as well. By default the 'host_' prefix will only be added if that table is joined with services or a different table. Thruk does it right, NagVis does not as it seems.

Let's see how to fix that bug in a reasonable fashion to stay compatible.

@icinga-migration
Copy link
Author

Updated by Anonymous on 2014-06-12 10:05:04 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset i2:627f96d85d10fa88b7e330fce6e55a3f7768c53a.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-09-16 09:14:49 +00:00

  • Project changed from 34 to Icinga 2
  • Category set to Livestatus

@icinga-migration icinga-migration added bug Something isn't working area/livestatus Legacy interface labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.0.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/livestatus Legacy interface bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant