<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><tt>Hey again,</tt></p>
<p><tt>I thought I might specify what I'm trying to achieve since I
might just be trying the wrong way.</tt></p>
<p><tt><tt>I would like to configure the most hosts possible by some
sort of grouping or tags - the CLASS function in combination
with analysis.cfg and hosts.cfg seemed to be the right way to
do this. But s</tt>ince I'm running a pretty big network infrastructure
with a lot of different hosts that run different software combinations,
I need to be able to combine some check groups, i.e. the
following in analysis.cfg:</tt></p>
<p><tt> CLASS=web<br>
PROC nginx 1 -1<br>
PROC php*fpm 1 -1<br>
PROC cron 1 -1<br>
CLASS=db<br>
PROC mysqld 1 -1<br>
CLASS=deb7<br>
PROC ntpd 1 -1<br>
CLASS=deb8<br>
PROC systemd-timesyncd 1 -1</tt></p>
<p><tt>So I can just add the PROC checks I need via CLASS assignments
in hosts.cfg and don't need to add custom configuration for
every server to analysis.cfg:</tt></p>
<p><tt> page myservers My Servers<br>
group domain1<br>
1.2.3.1 web.dom.tld # <b>CLASS:deb7,web</b> trace ssh<br>
1.2.3.2 db.dom.tld # <b>CLASS:deb8,db</b> trace ssh<br>
1.2.4.1 <a class="moz-txt-link-abbreviated" href="http://www.dom.tld">www.dom.tld</a> # <a class="moz-txt-link-freetext" href="https://www.dom.tld">https://www.dom.tld</a><br>
1.2.4.2 dev.dom.tld # <a class="moz-txt-link-freetext" href="https://user:pass@dev.dom.tld">https://user:pass@dev.dom.tld</a><br>
group domain2<br>
1.2.3.10 srv.dom2.tld # <b>CLASS:deb8,web,db</b> trace
ssh<br>
1.2.4.10 <a class="moz-txt-link-abbreviated" href="http://www.dom2.tld">www.dom2.tld</a> # <a class="moz-txt-link-freetext" href="https://www.dom2.tld">https://www.dom2.tld</a></tt></p>
<p><tt>And so on... I've got way more combinations, so manually
creating combined classes like "deb7-web", "deb7-db",
"deb7-web-db", etc. is not really an option.</tt></p>
<p><tt>I can't imagine I'm the first person trying to do this since
actually it's pretty essential to have check groups for
reduction of redundant config bloat.</tt></p>
<p><tt>Any help or hints would be really appreciated!</tt></p>
<p><tt>Kind regards and thanks in advance,<br>
David Winterstein<br>
</tt></p>
<br>
<div class="moz-cite-prefix">On 2017-05-19 13:11, David Winterstein
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:f9bc07d7-fe0b-51c8-2c16-a44fafe7f846@compositiv.com">
<pre wrap="">Hi everybody,
I didn't find something on this topic yet, so I thought I'd give it a
quick try at the mailing list:
Since the class assignment now works like a charm with analysis.cfg and
hosts.cfg (thanks a lot for that!) I wondered how I could possibly
assign multiple classes to a host.
Given an analysis.cfg containing something like this:
CLASS=class1
PROC sshd 1 1
CLASS=class2
PROC ntpd 1 1
A hosts.cfg like this only uses the first class provided - "class1" in
this case:
1.2.3.4 srv.dom.tld # CLASS:class1 CLASS:class2
While a hosts.cfg like this seems to combine both class names to the
new, unhandled group "class1,class2":
1.2.3.4 srv.dom.tld # CLASS:class1,class2
Is there a solution for this already or is it not possible to assign
multiple groups to a single host?
Thanks a lot in advance,
David Winterstein
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Compositiv GmbH
Hammer Deich 30
20537 Hamburg
Tel: 040 / 609 4349 0
Fax: 040 / 609 4349 40
Geschäftsführer Matthias Krawen
Amtsgericht Hamburg - HRB 122540
USt.-IdNr: DE282432834
Es gelten ausschließlich unsere AGB.</pre>
</body>
</html>