Inconsistency in a script
Re: Inconsistency in a script
When you run it and it doesn't work, does it still show up in the audit log? (Admin > Audit Log)
Re: Inconsistency in a script
Modify your script to look like this one:
Next, run:
and post the "debug.txt" to the forum.
Code: Select all
#!/bin/bash
echo ""
/bin/echo 'select count(*) from nagios_hosts;' | mysql -s -pnagiosxi nagios
echo ""
cd /usr/local/nagiosxi/scripts
/bin/cat /usr/local/nagiosxi/scripts/delete-hosts.csv | while read LINE
do
Name=`/bin/echo $LINE | /bin/cut -d, -f1`
./nagiosql_delete_host.php --host=$Name
done
./reconfigure_nagios.shCode: Select all
./delete-hosts.sh &> /tmp/debug.txtBe sure to check out our Knowledgebase for helpful articles and solutions!
-
peter.zanetti
- Posts: 90
- Joined: Wed Oct 01, 2014 8:34 am
Re: Inconsistency in a script
Sorry for the long wait. I will try and work on this Friday morning and post the requested file here.
Re: Inconsistency in a script
Thank you, let us know what happens.peter.zanetti wrote:Sorry for the long wait. I will try and work on this Friday morning and post the requested file here.
Former Nagios Employee.
me.
me.