[Check_mk (english)] command-line reinventory

Summary: What's the difference between

              cmk -II
         and
              cmk --inventory?

Details follow:

We have enough churn in our environment to make it worthwhile to run a
weekly cron job to regenerate our entire service inventory.

This runs a shell script under the site account, with contents that boil
down to the following:

   ~/bin/cmk -II
   ~/bin/cmk -R

A few weeks ago we upgraded from an omd-based installation of check_mk
version 1.2.4p5 to the enterprise edition of 1.2.8p5. With that, the
reinventory script continued to run, but it stopped listing the errors
it found during the -II operation.

Typical output before the change would look something like this (with
actual hostnames and IP addresses elided):

   Failed to inventorize <hostname1>: Cannot get data from TCP port NNN.NNN.NNN.XXX:6556: timed out
   Failed to inventorize <hostname2>: Cannot get data from TCP port NNN.NNN.NNN.YYY:6556: timed out
   Failed to inventorize <hostname3>: Cannot get data from TCP port NNN.NNN.NNN.ZZZ:6556: [Errno 111] Connection refused

This information is useful, because it helps our operations staff track
down the underlying problems with unreachable hosts.

Since I didn't want to lose it, I looked around and found the --inventory
option. This appeared to do the same job as -II, and continued to produce
exactly the same report we were accustomed to seeing.

I thought all was well, until last week I defined a couple of clusters and
added rules to distinguish the cluster-level services from the node-level
services. Initially that worked exactly as expected, but yesterday I found
that the cluster hostnames had reverted to having the node-level services
associated with them.

Eventually I realized that doing the inventory with --inventory was causing
that problem, and that the solution was to revert to -II instead.
    
...but I'd really like to get my report back. Can anyone explain what the
real difference is between the two inventory methods, and whether there's
a way to do what I want?

(And is this stuff is documented anywhere? I did look before asking these
questions here, but all I could find was the same discussion of -I and -II
which I first saw two years ago; I couldn't find anything at all about the
--inventory option, or about the change in -II behaviour.)

  Thanks,

     - Steven

···

--
___________________________________________________________________________
Steven Winikoff | "You can leave in a taxi. If you can't
Concordia University | get a taxi, you can leave in a huff.
Montreal, QC, Canada | If that's too soon, you can leave in a
Steven.Winikoff@concordia.ca | minute and a huff."
                               > - Groucho Marx

Hi Steven,

“-II” does a rediscovery of services wheras “–inventory” does a HW/SW-inventory. That’re totally different things.

The changed behavior in “-II” is that it normally does not report anything. If you want to know which services where discovered or similar you’ve to add “-v” param (up to 5 times) to get more information.

Regards,

Marcel

···

Steven Winikoff Steven.Winikoff@concordia.ca schrieb am Mi., 17. Aug. 2016 um 00:37 Uhr: > Summary: What’s the difference between

          cmk -II

     and

          cmk --inventory?

Details follow:

We have enough churn in our environment to make it worthwhile to run a

weekly cron job to regenerate our entire service inventory.

This runs a shell script under the site account, with contents that boil

down to the following:

~/bin/cmk -II

~/bin/cmk -R

A few weeks ago we upgraded from an omd-based installation of check_mk

version 1.2.4p5 to the enterprise edition of 1.2.8p5. With that, the

reinventory script continued to run, but it stopped listing the errors

it found during the -II operation.

Typical output before the change would look something like this (with

actual hostnames and IP addresses elided):

Failed to inventorize : Cannot get data from TCP port NNN.NNN.NNN.XXX:6556: timed out

Failed to inventorize : Cannot get data from TCP port NNN.NNN.NNN.YYY:6556: timed out

Failed to inventorize : Cannot get data from TCP port NNN.NNN.NNN.ZZZ:6556: [Errno 111] Connection refused

This information is useful, because it helps our operations staff track

down the underlying problems with unreachable hosts.

Since I didn’t want to lose it, I looked around and found the --inventory

option. This appeared to do the same job as -II, and continued to produce

exactly the same report we were accustomed to seeing.

I thought all was well, until last week I defined a couple of clusters and

added rules to distinguish the cluster-level services from the node-level

services. Initially that worked exactly as expected, but yesterday I found

that the cluster hostnames had reverted to having the node-level services

associated with them.

Eventually I realized that doing the inventory with --inventory was causing

that problem, and that the solution was to revert to -II instead.

…but I’d really like to get my report back. Can anyone explain what the

real difference is between the two inventory methods, and whether there’s

a way to do what I want?

(And is this stuff is documented anywhere? I did look before asking these

questions here, but all I could find was the same discussion of -I and -II

which I first saw two years ago; I couldn’t find anything at all about the

–inventory option, or about the change in -II behaviour.)

Thanks,

 - Steven


Steven Winikoff | "You can leave in a taxi. If you can’t

Concordia University | get a taxi, you can leave in a huff.

Montreal, QC, Canada | If that’s too soon, you can leave in a

Steven.Winikoff@concordia.ca | minute and a huff."

                           >                          - Groucho Marx

checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en