--=_4fb1627b4aacd642fa36a44cebc9326d
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=UTF-8;
format=flowed
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
--=_4fb1627b4aacd642fa36a44cebc9326d
Content-Transfer-Encoding: base64
Content-Type: text/x-diff;
name=navbar-search.patch
Content-Disposition: attachment;
filename=navbar-search.patch;
size=3898
ZGlmZiAtck51IG5hZ2lvcy5vbGQvY2dpL2NnaXV0aWxzLmMgbmFnaW9zL2NnaS9jZ2l1dGlscy5j
Ci0tLSBuYWdpb3Mub2xkL2NnaS9jZ2l1dGlscy5jCTIwMTMtMDUtMjkgMTg6MTE6MTAuMzA0MDE0
Mzk3ICswMjAwCisrKyBuYWdpb3MvY2dpL2NnaXV0aWxzLmMJMjAxMy0wN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L3N0YXR1cy5j
CTIwMTMtMDUtMjkgMTg6MDk6MzAuNTg0MDEyNTg1ICswMjAwCisrKyBuYWdpb3MvY2dpL3N0YXR1
cy5jCTIwMTMtMDUtMjkgMTg6MDU6MTEuMjA5NTEyNzY0ICswMjAwCkBAIC02MCw2ICs2MCw5IEBA
CiAKIGV4dGVybiBpbnQgZW5hYmxlX3NwbHVua19pbnRlZ3JhdGlvbjsKIAorZXh0ZXJuIGludCBu
YXZiYXJfc2VhcmNoX2Zvcl9hZGRyZXNzZXM7CitleHRlcm4gaW50IG5hdmJhcl9zZWFyY2hfZm9y
X2FsaWFzZXM7CisKIGV4dGVybiBob3N0ICpob3N0X2xpc3Q7CiBleHRlcm4gc2VydmljZSAqc2Vy
dmljZV9saXN0OwogZXh0ZXJuIGhvc3Rncm91cCAqaG9zdGdyb3VwX2xpc3Q7CkBAIC0xNDQsNiAr
MTQ3LDcgQEAKIAogY2hhciBhbGVydF9tZXNzYWdlW01BWF9NRVNTQUdFX0JVRkZFUl07CiBjaGFy
ICpob3N0X25hbWUgPSBOVUxMOworY2hhciAqaG9zdF9hZGRyZXNzID0gTlVMTDsKIGNoYXIgKmhv
c3RfZmlsdGVyID0gTlVMTDsKIGNoYXIgKmhvc3Rncm91cF9uYW1lID0gTlVMTDsKIGNoYXIgKnNl
cnZpY2Vncm91cF9uYW1lID0gTlVMTDsKQEAgLTI4MSw4ICsyODUsMTUgQEAKIAkJCQkJaWYoaXNf
YXV0aG9yaXplZF9mb3
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: jonas@freesources.org