Nagios hostgroup


#1

Drawing a blank here.

Typically with Nagios data bags, you would create the services and use the
’role’ as the hostgroup; would it be possible to apply multiple hostgroup
to a particular service?

I have storage servers that need to have C:, D:, and E:\ Drive and use
role ‘Storage’ to monitor all 3 drives; however, I have some old school
storage servers that use C:\ H:\ I:. Would I be able to append 'storage’
and ‘old_storage’ to the hostgroup name?

  • Nikhil Shah */ System Administrator

nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com http://www.dailyrindblog.com/

Facebook http://www.facebook.com/theorchard /
@orchtweetshttp://www.twitter.com/orchtweets

Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are
protected by the Electronic Communications Privacy Act (18 USC §§
2510-2521), (b) may contain confidential and/or legally privileged
information, and © are for the sole use of the intended recipient named
above. If you have received this electronic message in error, please notify
the sender and delete the electronic message. Any disclosure, copying,
distribution, or use of the contents of the information received in error
is strictly prohibited


#2

The Chef role to Nagios host group role assignment is a 1 to 1 relationship. You could use the search based host groups to add another host group though. You can search out attributes or chef roles and define another host group that includes a specific set of monitors. There’s an example of the syntax for that in the Readme and the examples directory.

Tim Smith - Systems Engineer
m: +1 707.738.8132

On Oct 10, 2013, at 11:52 AM, Nikhil Shah nshah@theorchard.com wrote:

Drawing a blank here.

Typically with Nagios data bags, you would create the services and use the ‘role’ as the hostgroup; would it be possible to apply multiple hostgroup to a particular service?

I have storage servers that need to have C:, D:, and E:\ Drive and use role ‘Storage’ to monitor all 3 drives; however, I have some old school storage servers that use C:\ H:\ I:. Would I be able to append ‘storage’ and ‘old_storage’ to the hostgroup name?


Nikhil Shah / System Administrator

nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com

Facebook / @orchtweets

Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and © are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited


#3

What Tim said. If you do a search based hostgroup the query would be like
"role:storage OR role:oldstorage". You can also specify multiple hostgroups
on the service by doing something like:

{

“hostgroup_name”: “storage,oldstorage”
}

Remember that Nagios supports things like wildcard matching, regexes, and
exclusions via the ! operator. Combining these with databags, especially
once COOK-3781 is merged in, will give you a lot of flexibility.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Thu, Oct 10, 2013 at 12:05 PM, Tim Smith tsmith@llnw.com wrote:

The Chef role to Nagios host group role assignment is a 1 to 1
relationship. You could use the search based host groups to add another
host group though. You can search out attributes or chef roles and define
another host group that includes a specific set of monitors. There’s an
example of the syntax for that in the Readme and the examples directory.
[image: Limelight Networks] http://www.limelight.com/Tim Smith - Systems
Engineer
m: +1 707.738.8132

On Oct 10, 2013, at 11:52 AM, Nikhil Shah nshah@theorchard.com wrote:

Drawing a blank here.

Typically with Nagios data bags, you would create the services and use the
’role’ as the hostgroup; would it be possible to apply multiple hostgroup
to a particular service?

I have storage servers that need to have C:, D:, and E:\ Drive and use
role ‘Storage’ to monitor all 3 drives; however, I have some old school
storage servers that use C:\ H:\ I:. Would I be able to append 'storage’
and ‘old_storage’ to the hostgroup name?

  • Nikhil Shah */ System Administrator

nshah@theorchard.com http://theorchard.com/

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com http://www.dailyrindblog.com/

Facebook http://www.facebook.com/theorchard / @orchtweetshttp://www.twitter.com/orchtweets

Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are
protected by the Electronic Communications Privacy Act (18 USC §§
2510-2521), (b) may contain confidential and/or legally privileged
information, and © are for the sole use of the intended recipient named
above. If you have received this electronic message in error, please notify
the sender and delete the electronic message. Any disclosure, copying,
distribution, or use of the contents of the information received in error
is strictly prohibited


#4

That was exactly what I was looking for:

{

“hostgroup_name”: “storage,oldstorage”
}

I am assuming this, depending on which role you pass to a node, would use this server. I wasn’t sure if the above would be accepted.

Nikhil Shah / System Administrator
nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com
Facebook / @orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and © are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Oct 10, 2013, at 3:12 PM, Morgan Blackthorne stormerider@gmail.com wrote:

{

“hostgroup_name”: “storage,oldstorage”
}


#5

What you probably want is to define two NSClient++/NRPE checks, one on
storage, and one on oldstorage, varying on the drive letters (but named the
same, which you can do in a recipe). Then your service definition would
apply to both hostgroups and the variation will be handled by the
underlying nodes themselves.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Thu, Oct 10, 2013 at 12:39 PM, Nikhil Shah nshah@theorchard.com wrote:

That was exactly what I was looking for:

{

“hostgroup_name”: “storage,oldstorage”
}

I am assuming this, depending on which role you pass to a node, would use
this server. I wasn’t sure if the above would be accepted.

*Nikhil Shah */ System Administrator
nshah@theorchard.com drudolph@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com http://www.dailyrindblog.com/
Facebook http://www.facebook.com/theorchard / @orchtweetshttp://www.twitter.com/orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are
protected by the Electronic Communications Privacy Act (18 USC §§
2510-2521), (b) may contain confidential and/or legally privileged
information, and © are for the sole use of the intended recipient named
above. If you have received this electronic message in error, please notify
the sender and delete the electronic message. Any disclosure, copying,
distribution, or use of the contents of the information received in error
is strictly prohibited.
*

On Oct 10, 2013, at 3:12 PM, Morgan Blackthorne stormerider@gmail.com
wrote:

{

“hostgroup_name”: “storage,oldstorage”
}