Results 1 to 6 of 6

Thread: non "ascii" characters in hostgroup name

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Location
    Russia, Ekaterinburg
    Posts
    22

    non "ascii" characters in hostgroup name

    I have a problem with shinken Livestatus and Check_mk:
    Sorry for my english.

    I can't get hosts from hostgroups, if hostgroup name contains non "ascii" characters:
    /check_mk/view.py?view_name=hostgroup&hostgroup=%D0%AF%D 1%81%D0%BD%D0%B0%D1%8F_2
    I get empty page

    all is well, if hostgroup name dont contains non "ascii" characters:
    /check_mk/view.py?view_name=hostgroup&hostgroup=switch
    I get all hosts from hostgroups switch.

    all works when i use nagios livestatus broker.

    How i can fix it?

  2. #2
    Junior Member
    Join Date
    Oct 2012
    Location
    Russia, Ekaterinburg
    Posts
    22

    Re: non "ascii" characters in hostgroup name

    Shinken Livestatus debug:
    REQUEST>>>>>
    GET hosts
    Filter: host_groups >= ?
    Localtime: 1349178226
    OutputFormat: python
    KeepAlive: on
    ResponseHeader: fixed16
    ColumnHeaders: off


    RESPONSE<<<<
    200 3
    []
    REQUEST>>>>>
    GET hosts
    Filter: host_groups >= switch
    Localtime: 1349178094
    OutputFormat: python
    KeepAlive: on
    ResponseHeader: fixed16
    ColumnHeaders: off


    RESPONSE<<<<
    200 671
    [[1, 0, 1, u'', u'', 1, u'localhost', u'generic-host', 2, u'_internal_host_up', 1, 0, 5, u'', u'24x7', 0, 1, [], [], [], [], [u'admins'], [u'admin'], 2, 1, 0, [], [], [], u'localhost', [], [], 0, 0, u'', 0, 1, 0, [u'\u042f', u'switch'], u'', 1, 50, u'', u'', u'', [], 1, 1, u'

  3. #3
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,130

    Re: non "ascii" characters in hostgroup name

    Can you enable the debug mode of the livestatus module? Should be an exception somewhere.
    No direct support by personal message. Please open a thread so everyone can see the solution

  4. #4
    Junior Member
    Join Date
    Oct 2012
    Location
    Russia, Ekaterinburg
    Posts
    22

    Re: non "ascii" characters in hostgroup name

    ok. I enable debug here:
    define module {
    module_name Livestatus
    module_type livestatus
    host * ; * = listen on all configured IP addresses
    port 50000 ; port to listen
    modules logsqlite
    debug /usr/local/shinken/var/ls.debug ; Enable only for debugging this module
    debug_queries 1 ; Set to 1 to dump queries/replies too (very verbose)
    }
    Full debug /usr/local/shinken/var/ls.debug:

    Get an LogStore Sqlite module for plugin logsqlite
    [1349323479] Info : Trying to init module: logsqlite
    [1349323479] Info : I correctly loaded the modules: [logsqlite]
    modulemanager file /usr/local/shinken/shinken/modulesmanager.pyc
    modulemanager absolute file /usr/local/shinken/shinken/modulesmanager.pyc
    Using modules path: /usr/local/shinken/shinken/modules
    Go run
    Openning LiveStatusLogStoreSqlite ok : /usr/local/shinken/var/livelogs.db
    Livestatus query thread started
    listening on tcp port 50000
    Regenerator: Creating config: 0
    Clean hosts/service of 0
    Cleaning host:0 srv:0
    Contact with data {'service_notifications_enabled': True, 'can_submit_commands': True, 'contact_name': u'admin', 'id': 1, 'instance_id': 0, 'service_notification_commands': '', 'downtimes': [], 'retain_status_information': True, 'service_notification_options': '', 'tags': set([u'generic-contact']), 'address1': 'none', 'address2': 'none', 'address3': 'none', 'address4': 'none', 'address5': 'none', 'address6': 'none', 'contactgroups': '', 'is_admin': True, 'password': u'admin', 'pager': u'0600000000', 'host_notification_period': '', 'notificationways': [<shinken.objects.notificationway.NotificationWa y object at 0x2a1f790>], 'host_notifications_enabled': True, 'host_notification_commands': '', 'service_notification_period': '', 'min_business_impact': '', 'email': u'shinken@localhost', 'modified_attributes': 0L, 'alias': 'none', 'host_notification_options': ''}
    Creating Contact: admin
    Got notif ways [<shinken.objects.notificationway.NotificationWa y object at 0x2a1f790>]
    Creating notif way email
    Contact with data {'service_notifications_enabled': True, 'can_submit_commands': False, 'contact_name': u'guest', 'id': 2, 'instance_id': 0, 'service_notification_commands': '', 'downtimes': [], 'retain_status_information': True, 'service_notification_options': '', 'tags': set([u'generic-contact']), 'address1': 'none', 'address2': 'none', 'address3': 'none', 'address4': 'none', 'address5': 'none', 'address6': 'none', 'contactgroups': '', 'is_admin': False, 'password': u'guest', 'pager': 'none', 'host_notification_period': '', 'notificationways': [<shinken.objects.notificationway.NotificationWa y object at 0x2a1fa10>], 'host_notifications_enabled': True, 'host_notification_commands': '', 'service_notification_period': '', 'min_business_impact': '', 'email': u'none', 'modified_attributes': 0L, 'alias': 'none', 'host_notification_options': ''}
    Creating Contact: guest
    Got notif ways [<shinken.objects.notificationway.NotificationWa y object at 0x2a1fa10>]
    Creating an contactgroup: admins in instance 0
    Creating an hostgroup: ? in instance 0
    Finish the configuration of instance 0
    In ALL Done linking phase for instance 0
    ALL LINKING TIMEALL LINKING TIMEALL LINKING TIMEALL LINKING TIMEALL LINKING TIMEALL LINKING TIMEALL LINKING TIMEALL LINKING TIMEALL LINKING TIMEALL LINKING TIME 9.48905944824e-05
    SORTING HOSTS AND SERVICES
    commit.....
    at Thu Oct 4 10:04:39 2012 we rotate the database file
    next rotation at Fri Oct 5 00:05:00 2012
    Creating Broker: broker-1 {'broker_name': u'broker-1', 'realm': u'All', 'timeout': 3, 'tags': set([]), 'address': u'localhost', 'alive': True, 'port': 7772, 'manage_sub_realms': True, 'spare': False, 'check_interval': 60, 'polling_interval': 1, 'id': 0, 'attempt': 0, 'max_check_attempts': 3, 'last_check': 1349323477.734357, 'reachable': True, 'manage_arbiters': True, 'data_timeout': 120}
    Created a new broker {'configuration_errors': [], 'broks': [], 'hash': '', 'tags': set([]), 'configuration_warnings': [], 'attempt': 0, 'alive': True, 'customs': {}, 'arb_satmap': {'port': 0, 'address': '0.0.0.0'}, 'plus': {}, 'managed_confs': {}, 'reachable': False, 'last_check': 0, 'id': 0, 'con': None}

    Updated broker
    broker added
    Creating Scheduler: scheduler-1 {'scheduler_name': u'scheduler-1', 'data_timeout': 120, 'timeout': 3, 'weight': 1, 'tags': set([]), 'skip_initial_broks': False, 'address': u'localhost', 'attempt': 0, 'alive': True, 'port': 7768, 'manage_sub_realms': True, 'spare': False, 'check_interval': 60, 'polling_interval': 1, 'id': 0, 're/usr/local/shinken/shinken/modules/livestatus_broker/livestatus_query.py:786: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
    return reference in getattr(item, attribute)(self)
    alm': u'All', 'max_check_attempts': 3, 'last_check': 1349323477.726102, 'reachable': True, 'manage_arbiters': False}
    Created a new scheduler {'configuration_errors': [], 'broks': [], 'external_commands': [], 'hash': '', 'managed_confs': {}, 'tags': set([]), 'configuration_warnings': [], 'reachable': False, 'alive': True, 'customs': {}, 'need_conf': True, 'plus': {}, 'conf': None, 'attempt': 0, 'arb_satmap': {'port': 0, 'address': '0.0.0.0'}, 'last_check': 0, 'push_flavor': 0, 'id': 0, 'con': None}

    Updated scheduler
    scheduler added
    Creating Poller: poller-1 {'poller_name': u'poller-1', 'alive': True, 'id': 0, 'port': 7771, 'passive': False, 'realm': u'All', 'manage_arbiters': False, 'manage_sub_realms': False, 'reachable': True, 'polling_interval': 1, 'min_workers': 0, 'check_interval': 60, 'tags': set([]), 'last_check': 1349323477.732505, 'max_workers': 0, 'spare': False, 'address': u'localhost', 'attempt': 0, 'data_timeout': 120, 'timeout': 3, 'max_check_attempts': 3, 'processes_by_worker': 256}
    Created a new poller {'configuration_errors': [], 'broks': [], 'hash': '', 'tags': set([]), 'configuration_warnings': [], 'attempt': 0, 'alive': True, 'customs': {}, 'arb_satmap': {'port': 0, 'address': '0.0.0.0'}, 'plus': {}, 'managed_confs': {}, 'reachable': False, 'last_check': 0, 'id': 0, 'con': None}

    Updated poller
    poller added
    Creating Reactionner: reactionner-1 {'alive': True, 'port': 7769, 'passive': False, 'realm': u'All', 'id': 0, 'manage_sub_realms': False, 'reachable': True, 'polling_interval': 1, 'min_workers': 1, 'check_interval': 60, 'tags': set([]), 'reactionner_name': u'reactionner-1', 'last_check': 1349323477.730575, 'max_workers': 15, 'spare': False, 'address': u'localhost', 'attempt': 0, 'data_timeout': 120, 'timeout': 3, 'manage_arbiters': False, 'max_check_attempts': 3, 'processes_by_worker': 256}
    Created a new reactionner {'configuration_errors': [], 'broks': [], 'hash': '', 'tags': set([]), 'configuration_warnings': [], 'attempt': 0, 'alive': True, 'customs': {}, 'arb_satmap': {'port': 0, 'address': '0.0.0.0'}, 'plus': {}, 'managed_confs': {}, 'reachable': False, 'last_check': 0, 'id': 0, 'con': None}

    Updated reactionner
    reactionner added
    Creating Receiver: receiver-1 {'realm': u'All', 'timeout': 3, 'tags': set([]), 'receiver_name': u'receiver-1', 'direct_routing': False, 'address': u'localhost', 'alive': True, 'port': 7773, 'manage_sub_realms': True, 'spare': False, 'check_interval': 60, 'polling_interval': 1, 'id': 0, 'attempt': 0, 'max_check_attempts': 3, 'last_check': 1349323477.736515, 'reachable': True, 'manage_arbiters': False, 'data_timeout': 120}
    Created a new receiver {'configuration_errors': [], 'broks': [], 'hash': '', 'tags': set([]), 'configuration_warnings': [], 'attempt': 0, 'alive': True, 'customs': {}, 'arb_satmap': {'port': 0, 'address': '0.0.0.0'}, 'plus': {}, 'managed_confs': {}, 'reachable': False, 'last_check': 0, 'id': 0, 'con': None}

    Updated receiver
    receiver added
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    DURATION 0.0011s
    REQUEST>>>>>
    GET status
    Columns: livestatus_version program_version program_start num_hosts num_services
    Localtime: 1349323484
    OutputFormat: python
    KeepAlive: on
    ResponseHeader: fixed16


    connection 13 is idle since 0 seconds (receiving)

    DURATION 0.0015s
    REQUEST>>>>>
    GET hosts
    Columns: host_scheduled_downtime_depth host_alias host_num_services_pending host_pnpgraph_present host_comments_with_info host_num_services_crit host_icon_image host_in_notification_period host_custom_variable_values host_modified_attributes_list host_downtimes host_filename host_acknowledged host_custom_variable_names host_state host_accept_passive_checks host_has_been_checked host_num_services_warn host_notifications_enabled host_num_services_unknown host_num_services_ok host_active_checks_enabled host_is_flapping host_action_url_expanded host_name host_check_command host_notes_url_expanded
    Filter: host_groups >= ?
    AuthUser: admin
    Localtime: 1349323484
    OutputFormat: python
    KeepAlive: on
    ResponseHeader: fixed16
    Limit: 1001


    connection 13 is idle since 0 seconds (r/usr/local/shinken/shinken/modules/livestatus_broker/livestatus_query.py:726: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
    return getattr(item, attribute)(self) == reference
    eceiving)


    connection 13 is idle since 0 seconds (receiving)

    shutdown socket 13
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    DURATION 0.0005s
    REQUEST>>>>>
    GET status
    Columns: livestatus_version program_version program_start num_hosts num_services
    Localtime: 1349323497
    OutputFormat: python
    KeepAlive: on
    ResponseHeader: fixed16


    connection 15 is idle since 0 seconds (receiving)

    DURATION 0.0014s
    REQUEST>>>>>
    GET hosts
    Columns: host_scheduled_downtime_depth host_alias host_num_services_pending host_pnpgraph_present host_comments_with_info host_num_services_crit host_icon_image host_in_notification_period host_custom_variable_values host_modified_attributes_list host_downtimes host_filename host_acknowledged host_custom_variable_names host_state host_accept_passive_checks host_has_been_checked host_num_services_warn host_notifications_enabled host_num_services_unknown host_num_services_ok host_active_checks_enabled host_is_flapping host_action_url_expanded host_name host_check_command host_notes_url_expanded
    Filter: host_groups >= ?
    AuthUser: admin
    Localtime: 1349323497
    OutputFormat: python
    KeepAlive: on
    ResponseHeader: fixed16
    Limit: 1001


    connection 15 is idle since 0 seconds (receiving)

    DURATION 0.0009s
    REQUEST>>>>>
    GET hostgroups
    Columns: alias
    Filter: name = ?
    AuthUser: admin
    Localtime: 1349323497
    OutputFormat: python
    KeepAlive: on
    ResponseHeader: fixed16
    ColumnHeaders: off


    connection 15 is idle since 0 seconds (receiving)

    DURATION 0.0008s
    REQUEST>>>>>
    GET hostgroups
    Columns: alias
    Filter: name = ?
    AuthUser: admin
    Localtime: 1349323497
    OutputFormat: python
    KeepAlive: on
    ResponseHeader: fixed16
    ColumnHeaders: off


    connection 15 is idle since 0 seconds (receiving)

    connection 15 is idle since 0 seconds (receiving)

    shutdown socket 15
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    commit.....
    [liveStatus] So I quit

    What should I do next?

  5. #5
    Administrator
    Join Date
    Dec 2011
    Posts
    278

    Re: non "ascii" characters in hostgroup name

    Thanks for identifying the symptms igup!

    Opened a ticket in Shinken github. https://github.com/naparuba/shinken/issues/628

    Now a dev needs to fix it...

    xkilian

  6. #6
    Junior Member
    Join Date
    Oct 2012
    Location
    Russia, Ekaterinburg
    Posts
    22

    Re: non "ascii" characters in hostgroup name


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •