[Nagios-devel] Nagios navbar search enhancement (Was: Questions

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Nagios navbar search enhancement (Was: Questions

Post by Guest »

--=_e11b36d4d4bd9801ea307ccfa36a427d
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=UTF-8;
format=flowed

Hey,

I just prepared a patch against git master (commit 758a64). I hope that
it helps. Don't hesitate to ask if you've any questions.

Also feel free to rename the config options if you don't like the names.

The patch is attached.

Kind regards,
jonas

Am 2013-06-03 22:26, schrieb Andreas Ericsson:
> Would you care to forward the patch so it applies to Nagios 4 as well?
>
> Otherwise it's likely to get dropped on the floor I'm afraid.
>
> On 05/29/2013 06:17 PM, Jonas Meurer wrote:
>> Hello,
>>
>> Am 2013-03-01 09:05, schrieb Andreas Ericsson:
>>> On 02/28/2013 10:49 PM, Jonas Meurer wrote:
>>>> Am 20.02.2013 16:13, schrieb Jonas Meurer:
>>>>> Hello,
>>>>
>>>> Hey again,
>>>>
>>>>> we're using Nagios as monitoring system for several hundred
>>>>> systems.
>>>>> While navigating through hosts and services, recently two questions
>>>>> regarding the quick search (in navigation bar) raised:
>>>>>
>>>>> 1/ Why doesn't nagios search for host aliases as well? Is it
>>>>> possible
>>>>> to enable alias searching? We're using rather short values for
>>>>> host_name, and tend to add information like server position to the
>>>>> alias. Thus searching for host_name and alias would be awesome for
>>>>> us.
>>>>>
>>>
>>> Today it's not possible to enable alias searching. Patches welcome.
>>> If you create one, please use some format that makes it possible to
>>> add
>>> searching on other fields as well, such as "alias~" or some
>>> such.
>>>
>>>>> 2/ When searching for IP addresses, only the first match is
>>>>> returned.
>>>>> In some cases (e.g. NRPE Port forwarding through firewall), several
>>>>> hosts have the same IP address. For these cases it's rather
>>>>> irritating,
>>>>> that only the first matching host is returned.
>>>>>
>>>
>>> Tru dat. Patches welcome. You'll want to find and remove the correct
>>> "break" statement, I guess. Other than that it shouldn't be much
>>> trouble.
>>
>> I finally managed to prepare a patch that fixes both shortcomings. It
>> adds
>> two new configuration options to configure the behavior of the
>> navigation
>> bar search: search for hostname only, or also for addresses, or also
>> for
>> aliases.
>>
>> I reported the patch as feature request at
>> http://tracker.nagios.org/view.php?id=459
>>
>> Kind regards,
>> jonas
--=_e11b36d4d4bd9801ea307ccfa36a427d
Content-Transfer-Encoding: base64
Content-Type: text/x-diff;
name=enhance_navbar_search.patch
Content-Disposition: attachment; filename=enhance_navbar_search.patch;
size=4341

RnJvbSA1ZDdlNzNjMjAzNTc1ZjU4ODFjMTBlYWZjYjczZThiNjA1NzY2OTVjIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBKb25hcyBNZXVyZXIgPGpvbmFzQGZyZWVzb3VyY2VzLm9yZz4K
RGF0ZTogVHVlLCA0IEp1biAyMDEzIDE1OjMxOjI2ICswMjAwClN1YmplY3Q6IFtQQVRDSF0gZW5o
YW5jZSB0aGUgbmF2YmFyIHNlYXJjaDogLSBuZXcgY29uZmlnIG9wdGlvbgogJ25hdmJhcl9zZWFy
Y2hfZm9yX2FkZHJlc3Nlcyc6IHNlYXJjaCBmb3IgSVAgYWRkcmVzc2VzICAgaW4KIG5hdmJhciBz
ZWFyY2guIC0gbmV3IGNvbmZpZyBvcHRpb24KICduYXZiYXJfc2VhcmNoX2Zvcl9hbGlhc2VzJzog
c2VhcmNoIGZvciBob3N0IGFsaWFlcyBpbiAgCiBuYXZiYXIgc2VhcmNoLgoKLS0tCiBjZ2kvY2dp
dXRpbHMuYyAgICAgICAgICAgfCAgICA5ICsrKysrKysrKwogY2dpL3N0YXR1cy5jICAgICAgICAg
ICAgIHwgICAyMyArKysrKysrKysrKysrKysrKysrKystLQogc2FtcGxlLWNvbmZpZy9jZ2kuY2Zn
LmluIHwgICAxMiArKysrKysrKysrKysKIDMgZmlsZXMgY2hhbmdlZCwgNDIgaW5zZXJ0aW9ucygr
KSwgMiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9jZ2kvY2dpdXRpbHMuYyBiL2NnaS9jZ2l1
dGlscy5jCmluZGV4IDJiNDg4ZDYuLjAzN2E3NDIgMTAwNjQ0Ci0tLSBhL2NnaS9jZ2l1dGlscy5j
CisrKyBiL2NnaS9jZ2l1dGlscy5jCkBAIC02Niw2ICs2Niw5IEBAIGludCAgICAgICAgICAgICBl
bmFibGVfc3BsdW5rX2ludGVncmF0aW9uID0gRkFMU0U7CiBjaGFyICAgICAgICAgICAgKnNwbHVu
a191cmwgPSBOVUxMOwogaW50ICAgICAgICAgICAgIGxvY2tfYXV0aG9yX25hbWVzID0gVFJVRTsK
IAoraW50ICAgICAgICAgICAgIG5hdmJhcl9zZWFyY2hfZm9yX2FkZHJlc3NlcyA9IEZBTFNFOwor
aW50ICAgICAgICAgICAgIG5hdmJhcl9zZWFyY2hfZm9yX2FsaWFzZXMgPSBGQUxTRTsKKwogdGlt
ZV90ICAgICAgICAgIHRoaXNfc2NoZWR1bGVkX2xvZ19yb3RhdGlvbiA9IDBMOwogdGltZV90ICAg
ICAgICAgIGxhc3Rfc2NoZWR1bGVkX2xvZ19yb3RhdGlvbiA9IDBMOwogdGltZV90ICAgICA

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: jonas@freesources.org
Locked