RE: [Nagios-users] Réf. : [Nagios-users] host_name and service_description examples
Nathan Oyler
noyler at khimetrics.com
Fri Jun 10 16:48:19 CEST 2005
They worked for me.
________________________________
From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Davy Gaussen
Sent: Friday, June 10, 2005 2:25 AM
To: 'nagios-users at lists.sourceforge.net'; nagios-devel; Andreas Ericsson
Subject: [Nagios-users] Réf. : [Nagios-users] host_name and service_description examples
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 <mailto:ae at op5.se>
Date : 06/10/05 10:46:03
A : 'nagios-users at lists.sourceforge.net' <mailto:nagios-users at lists.sourceforge.net> ; nagios-devel <mailto:nagios-devel at lists.sourceforge.net>
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
<http://www.incredimail.com/index.asp?id=412&lang=12>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20050610/4dce610b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 9428 bytes
Desc: image001.gif
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20050610/4dce610b/attachment.gif>
More information about the Developers
mailing list