Re: Bulk Clone from Command line
Posted: Thu May 28, 2015 10:25 am
Please, do. I will keep this topic open for the time being.Thanks! Will let you know how it goes!
Support for Nagios products and services
https://support.nagios.com/forum/
Please, do. I will keep this topic open for the time being.Thanks! Will let you know how it goes!
Code: Select all
#!/bin/bashCode: Select all
[root@esu2v236 scripts]# /usr/local/nagiosxi/scripts/cfg- generator.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://loca lhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'subm it=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.login--2015-06-10 08:59:44-- http://localhost/nagiosxi/includes/compon ents/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”
[ <=> ] 10,379 --.-K/s in 0.008s
2015-06-10 08:59:44 (1.21 MB/s) - “nagiosql.login” saved [10379]
LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
SETUID ROOT OK
RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://loca lhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'subm it=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.login--2015-06-10 08:59:45-- http://localhost/nagiosxi/includes/compon ents/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”
[ <=> ] 10,379 --.-K/s in 0.008s
2015-06-10 08:59:45 (1.21 MB/s) - “nagiosql.login” saved [10379]
LOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes /components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2015-06-10 08:59:45-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.export.monitoring”
[ <=> ] 13,233 45.1K/s in 0.3s
2015-06-10 08:59:45 (45.1 KB/s) - “nagiosql.export.monitoring” saved [13233]
WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributo rs
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Warning: Service 'DisplayAuditWCF.svc' on host 'BL001ASRET01' has no default con tacts or contactgroups defined!
Checked 19 services.
Warning: Host 'BL001ASRET01' has no default contacts or contactgroups defined!
Checked 4 hosts.
Checked 4 host groups.
Checked 0 service groups.
Checked 10 contacts.
Checked 2 contact groups.
Checked 119 commands.
Checked 16 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 4 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 16 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 2
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...
Stopping nagios: done.
Starting nagios: done.
Code: Select all
K4283696, K4283696, Test, LabDISDevicesCode: Select all
K4283696,K4283696,Test,LabDISDevicesCode: Select all
./cfg-generator.shCode: Select all
bash -x cfg-generator.sh