Installation and REST API Issues
Posted: Mon Apr 30, 2018 11:08 am
Installation Method Offline installer on Centos 7
Installation log shows following error.
-----
Running pre-flight check on configuration data...
Checking objects...
Error: There are no services defined!
Checked 0 services.
Error: There are no hosts defined!
Checked 0 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 1 contacts.
Checked 0 contact groups.
Checked 124 commands.
Checked 3 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 0 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 3 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 2
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
RET: 1
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /tmp/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
/tmp/nagiosxi/nagiosxi/basedir/scripts
ls: cannot access /usr/local/nagiosxi/nom/checkpoints/nagioscore/*.gz: No such file or directory
NO NOM SNAPSHOT FOUND!
------
Default Services Hosts and many templates are not configured. I'm able to fix this with script restore_defaults.sh.
There seems to be another Issue with REST API However. Following test request:
curl -XPOST "https://cnaxi1097/nagiosxi/api/v1/confi ... 0&pretty=1" -d "host_name=testapihost&address=127.0.0.1&check_command=check_ping\!3000,80%\!5000,100%&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin¬ification_interval=5¬ification_period=24x7&applyconfig=1" -k
returns
{
"success": "Successfully added testapihost to the system. Config applied, Nagios Core was restarted."
}
Unfortunately the Host testapihost newer appears in NagiosXI even after applying config. I'm able to manually add and remove hosts however over the Web Frontend.
Installation log shows following error.
-----
Running pre-flight check on configuration data...
Checking objects...
Error: There are no services defined!
Checked 0 services.
Error: There are no hosts defined!
Checked 0 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 1 contacts.
Checked 0 contact groups.
Checked 124 commands.
Checked 3 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 0 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 3 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 2
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
RET: 1
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /tmp/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
/tmp/nagiosxi/nagiosxi/basedir/scripts
ls: cannot access /usr/local/nagiosxi/nom/checkpoints/nagioscore/*.gz: No such file or directory
NO NOM SNAPSHOT FOUND!
------
Default Services Hosts and many templates are not configured. I'm able to fix this with script restore_defaults.sh.
There seems to be another Issue with REST API However. Following test request:
curl -XPOST "https://cnaxi1097/nagiosxi/api/v1/confi ... 0&pretty=1" -d "host_name=testapihost&address=127.0.0.1&check_command=check_ping\!3000,80%\!5000,100%&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin¬ification_interval=5¬ification_period=24x7&applyconfig=1" -k
returns
{
"success": "Successfully added testapihost to the system. Config applied, Nagios Core was restarted."
}
Unfortunately the Host testapihost newer appears in NagiosXI even after applying config. I'm able to manually add and remove hosts however over the Web Frontend.