When you are passing the config name, you are NOT including the ".cfg" extension, do you?
For example, if you had a config called "test.cfg", you would run:
Code: Select all
./nagiosql_delete_service.php --config=test
If you used "--config=test.cfg" instead, you would get an error.
BTW, can you connect to the nagiosql db on the remote box from the Nagios XI server?
Example:
Code: Select all
echo 'show tables;' | mysql -t -unagiosql -pnagiosql nagiosql -h x.x.x.x
+--------------------------------------------+
| Tables_in_nagiosql |
+--------------------------------------------+
| tbl_command |
| tbl_contact |
| tbl_contactgroup |
| tbl_contacttemplate |
| tbl_domain |
| tbl_host |
| tbl_hostdependency |
| tbl_hostescalation |
| tbl_hostextinfo |
| tbl_hostgroup |
| tbl_hosttemplate |
| tbl_info |
| tbl_lnkContactToCommandHost |
| tbl_lnkContactToCommandService |
| tbl_lnkContactToContactgroup |
| tbl_lnkContactToContacttemplate |
| tbl_lnkContactToVariabledefinition |
| tbl_lnkContactgroupToContact |
| tbl_lnkContactgroupToContactgroup |
| tbl_lnkContacttemplateToCommandHost |
| tbl_lnkContacttemplateToCommandService |
| tbl_lnkContacttemplateToContactgroup |
| tbl_lnkContacttemplateToContacttemplate |
| tbl_lnkContacttemplateToVariabledefinition |
| tbl_lnkHostToContact |
| tbl_lnkHostToContactgroup |
| tbl_lnkHostToHost |
| tbl_lnkHostToHostgroup |
| tbl_lnkHostToHosttemplate |
| tbl_lnkHostToVariabledefinition |
| tbl_lnkHostdependencyToHost_DH |
| tbl_lnkHostdependencyToHost_H |
| tbl_lnkHostdependencyToHostgroup_DH |
| tbl_lnkHostdependencyToHostgroup_H |
| tbl_lnkHostescalationToContact |
| tbl_lnkHostescalationToContactgroup |
| tbl_lnkHostescalationToHost |
| tbl_lnkHostescalationToHostgroup |
| tbl_lnkHostgroupToHost |
| tbl_lnkHostgroupToHostgroup |
| tbl_lnkHosttemplateToContact |
| tbl_lnkHosttemplateToContactgroup |
| tbl_lnkHosttemplateToHost |
| tbl_lnkHosttemplateToHostgroup |
| tbl_lnkHosttemplateToHosttemplate |
| tbl_lnkHosttemplateToVariabledefinition |
| tbl_lnkServiceToContact |
| tbl_lnkServiceToContactgroup |
| tbl_lnkServiceToHost |
| tbl_lnkServiceToHostgroup |
| tbl_lnkServiceToServicegroup |
| tbl_lnkServiceToServicetemplate |
| tbl_lnkServiceToVariabledefinition |
| tbl_lnkServicedependencyToHost_DH |
| tbl_lnkServicedependencyToHost_H |
| tbl_lnkServicedependencyToHostgroup_DH |
| tbl_lnkServicedependencyToHostgroup_H |
| tbl_lnkServicedependencyToService_DS |
| tbl_lnkServicedependencyToService_S |
| tbl_lnkServiceescalationToContact |
| tbl_lnkServiceescalationToContactgroup |
| tbl_lnkServiceescalationToHost |
| tbl_lnkServiceescalationToHostgroup |
| tbl_lnkServiceescalationToService |
| tbl_lnkServicegroupToService |
| tbl_lnkServicegroupToServicegroup |
| tbl_lnkServicetemplateToContact |
| tbl_lnkServicetemplateToContactgroup |
| tbl_lnkServicetemplateToHost |
| tbl_lnkServicetemplateToHostgroup |
| tbl_lnkServicetemplateToServicegroup |
| tbl_lnkServicetemplateToServicetemplate |
| tbl_lnkServicetemplateToVariabledefinition |
| tbl_lnkTimeperiodToTimeperiod |
| tbl_logbook |
| tbl_mainmenu |
| tbl_service |
| tbl_servicedependency |
| tbl_serviceescalation |
| tbl_serviceextinfo |
| tbl_servicegroup |
| tbl_servicetemplate |
| tbl_session |
| tbl_session_locks |
| tbl_settings |
| tbl_submenu |
| tbl_timedefinition |
| tbl_timeperiod |
| tbl_user |
| tbl_variabledefinition |
+--------------------------------------------+