Nagios navbar search enhancement (Was: Questions about Nagios quick search)

Jonas Meurer jonas at freesources.org
Tue Jun 4 15:43:25 CEST 2013


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~<regex>" 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enhance_navbar_search.patch
Type: text/x-diff
Size: 4341 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20130604/5848239d/attachment.patch>
-------------- next part --------------
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Developers mailing list