Réf. : [Nagios-users] host_name and service_description examples

Davy Gaussen nagiosadmin at snef.fr
Fri Jun 10 11:28:22 CEST 2005


Hi,

I've copied and pasted your command lines and nothing appears in both
host_name_vars and service_description_vars. I thing your regexes are
incorrect/incomplete.
 
(sed -n '/^[^#].*host_name/{s/.*host_name[\t ]*\([^\t ]*\)/\1/;p}'
/usr/local/nagios/etc/hosts.cfg| sort | uniq > host_name_vars)
 

-------Message original-------
 
De : Andreas Ericsson
Date : 06/10/05 10:46:03
A : 'nagios-users at lists.sourceforge.net'; nagios-devel
Sujet : [Nagios-users] host_name and service_description examples
 
Ahoy all, and sorry for cross-posting.
 
I'm working on improving the hash-functions in Nagios in an effort to
boost performance. To do that, I need some real-world example input of
host_name and service_description variables to get accurate timing
results of the various hash-functions I'm considering.
 
Please understand that I'll be posting the test-data variables along
with the example timing code, so if your variables of that kind contain
sensitive information you shouldn't send it.
 
You can use the two commands below to extract host_names and
service_descriptions from your configuration.
 
Note that <cfg-files> should be replaced with something like
/usr/local/nagios/etc/*.cfg on a default installation. Mind the
line-breaks. Both sed-commands should be on a single line.
 
sed -n '/^[^#].*host_name/{s/.*host_name[\t ]*\([^\t ]*\)/\1/;p}'
<cfg-files> | sort | uniq > host_name_vars
 
sed -n '/^[^#].*service_description/{s/.*service_description[\t ]*\([^\t
]*\)/\1/;p}' <cfg-files> | sort | uniq > service_description_vars
 
Please compress the files host_name_vars and service_description_vars
prior to sending it to me. bzip2 does the best job with text-files.
 
 
Thanks for helping out.
 
--
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer
 
 
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you
shotput
a projector? How fast can you ride your desk chair down the office luge
track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
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
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050610/2f2cc3e9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMSTP.gif
Type: image/gif
Size: 9428 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050610/2f2cc3e9/attachment.gif>


More information about the Users mailing list