[omd-users] Add hosts from commandline

Marcel Schulte schulte.marcel at gmail.com
Wed Sep 16 21:58:33 CEST 2015


Hi Govind,

have a look at the script "wato_import.py", found in OMD folder
~/share/doc/check_mk/treasures/ (folder differs in standalone installations
but is also available. If you're not using OMD I'm sure you will be able to
tweak it to work in standalone installation.

This script is the best chance to get what you want if your check_mk
version is older than 1.2.5i6. 1.2.5i6 and later provide WATO web API,
 documented here: http://mathias-kettner.de/checkmk_wato_webapi.html
Beware the action "get_all_hosts" is new and only available in versions of
1.2.7 or after 1.2.6p10.

HTH,
Marcel

Govind J. Parashar <Govind.Parashar at mastek.com> schrieb am Mi., 16. Sep.
2015 um 10:18 Uhr:

> Hi All
>
>
> I'm looking for a way to add the hosts into wato configuration file​ that
> are being monitored from the commandline.
> Something like:
> 1. Create a host file for the host
> 2. Add host list into this file
> 3. Read each host and add into wato configuration file
>
> Thanks
> Govind P
>
>
>
>
> MASTEK LTD.
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Opinions expressed in this e-mail are those of the individual and not that
> of Mastek Limited, unless specifically indicated to that effect. Mastek
> Limited does not accept any responsibility or liability for it. This e-mail
> and attachments (if any) transmitted with it are confidential and/or
> privileged and solely for the use of the intended person or entity to which
> it is addressed. Any review, re-transmission, dissemination or other use of
> or taking of any action in reliance upon this information by persons or
> entities other than the intended recipient is prohibited. This e-mail and
> its attachments have been scanned for the presence of computer viruses. It
> is the responsibility of the recipient to run the virus check on e-mails
> and attachments before opening them. If you have received this e-mail in
> error, kindly delete this e-mail from desktop and server.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> _______________________________________________
> omd-users mailing list
> omd-users at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/omd-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mathias-kettner.de/pipermail/omd-users/attachments/20150916/cb9ae60e/attachment.html>


More information about the omd-users mailing list