Utilities

sqldelete

Description:

sqldelete is a C program used to remove multiple Hosts from the Nagios XI server’s nagiosql MYSQL database quickly.

Current Version

1.0

Last Release Date

January 30, 2020

Compatible With

  • Nagios XI

Owner


Project Files
Project Notes
sqldelete is a C program used to remove multiple Hosts from the Nagios XI server's nagiosql MYSQL database quickly. To compile it, a C development environment needs to be installed on the server as well as the mysql-devel package or the mariadb-devel package. Extract the ZIP file and run make to compile. USAGE:sqldelete -o -m -u -p Options : -o Single Hostname to remove -f File name of multiple Host names to remove -m MYSQL server / IP (Required) -u MYSQL Username (Required) -p MYSQL Password (Required) -t MYSQL Database Name (Required) -d Print Debug information -r Do not restore configs on error. -h -? Print this help -V Print Version Here is an example command line you would use to delete a single host called somehost. If the host name has a space in it, enclose it in double quotes like this "some host". ./sqldelete -o somehost -m localhost -u root -p nagiosxi -t nagiosql Here is an example command line you would use to delete multiple hosts. The hostfile option is a list of hosts you want to remove. ./sqldelete -f hostfile -m localhost -u root -p nagiosxi -t nagiosql The names of the hosts need to be on a separate line like the example below. host name dummy_host localhost host1.name testhost bad host Notice that the host names with a space do not require double quotes around the name. Here is a description of the steps the application takes when executed. 1. It will run a verification of the configurations. If there is an error. It will exit. 2. If the verification is good, it will create a backup. 3. It will go through the host or hosts to remove and build tables of the objects to remove. 4. It will remove all of the objects and run a verification of the new configurations. 5. If good, it will Apply the Configurations and restart the Nagios process. 6. If the configuration does not verify, it will restore the backup and notify you. Unless the -r option is specified. It will not restore the backup and it will not restart Nagios. This allows you to login to the XI GUI and resolve the configuration issue manually.
Reviews (0) Add a Review
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
0 (0)
Favorites
0
Views
4,295