CheckMK Search Inconsistent

,

Good morning/afternoon.

There’s been a long standing bug in CheckMK that I’m hoping can be resolved. When typing in the Quicksearch, especially for quick typists, the search results in the popup box will typically either auto clear (no results), or return the results of an earlier keystroke.

It would be great if the quicksearch only showed the results of the most recent keystroke (discarding anything that comes back for a previous keystroke), and didn’t clear results before having a chance to select my results. I almost always end up typing in my server or service name, wait a second, backspace a single character, wait a second, then retype the single character to get the correct results.

Thanks!
Tralin

Hey, all. Just bumping this back to the top in hopes to get it addressed.

Thanks,
Tralin

I think this is not directly troubleshooting more like feedback for @martin.hirschvogel :wink:

My mistake! Should I start a new thread, or will someone move it?

We will build something for exactly these types of feedback to consolidate all the channels which we have into something manageable.
Maybe that will be implemented by the end of the year, then there will be an announcement. So please be patient a bit longer.

2 Likes

For now, I’ll move it under the Feedback category :slight_smile:

Thanks, fayepal!

In doing a little more reading into the code, in the mksearch() JavaScript function, or one of the functions before it, it would be great to add some sort of index as a variable like “currentSearchIndex”, similar to how “oldValue = val”:

function mkSearch(oField) {
    if (oField == null) return;

    var val = oField.value;
    if (mkSearchResultShown() && val == oldValue) return; // nothing changed, no new search
    oldValue = val;
    //============================================//
    //Add some index here before submitting search//
    //============================================//

When the search request is sent to the server, include the currentSearchIndex variable with it. Then in the handle_search_response() function, wrap “oContainer.innerHTML = code;” in an if statement to check if the returned index is less than the currentSearchIndex, and if so, discard it.

function handle_search_response(oField, code) {
    if (code != "") {
        var oContainer = document.getElementById("mk_search_results");
        if (!oContainer) {
            oContainer = document.createElement("div");
            oContainer.setAttribute("id", "mk_search_results");
            oField.parentNode.appendChild(oContainer);
        }

        //==================================//
        //Wrap this with check against index//
        //==================================//
        oContainer.innerHTML = code;
    } else {
        close_popup();
    }
}

Quick question: What edition and version are you using, experiencing this behavior

I’m currently on CEE 2.0.0p12, but I’ve experienced this for years across multiple CheckMK installs in different companies. I find it is more noticable now with CMK being installed across the internet rather than on my LAN.

Thanks,
Tralin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.