Groundwork will not commit and Nagios pre-flight check gives a blank screen


After I had created a new command and then a new HP ASR monitoring service I found that when I went to commit the portion of the screen on the right just went blank and nothing happened.

I looked back at the command I had created and there was no detail in the right hand side which should have been populated with the Command Wizard window that includes the specific command configuration and details.

I assumed then that the issue was caused by the command and that it had become in some way corrupt.

When you create an entity within Groundwork such as a host, service, command etc it is written to the Monarch database. Once it is committed it is then also added to the Nagios config files in.

So it is simple – remove the specific command entry from the commands table in the Monarch database.

Except it wasn’t. I wanted to install MySQL workbench on the CentOS server hosting Groundwork. I just couldn’t get it to load. Then I couldn’t open MySQL from the command line and was receiving a variety of errors. After much trial and error this is how I managed to delete the offending command entry from the Monarch database.

1. Installed MySQL Workbench on my Windows 7 client

Need to allow remote access to the MySQL database

MySQL looks at the file my.cnf when opening the mysql client. You will get an error when trying to open the client because MySQL is looking at the /etc/my.cnf rather than /usr/local/groundwork/mysql/my.cnf

This can be done remotely using putty or on a terminal window on the server itself

2. Backup or take a copy of /etc/my.cnf and overwrite with the /usr/local/groundwork/mysql/my.cnf version

3. Stop and restart gwservices which will restart MySQL

/etc/init.d/groundwork stop

/etc/init.d/groundwork start

4. Open mysql by typing mysql

5. Type GRANT ALL PRIVILEGES ON *.* TO username@yourclientIPaddress;

For example GRANT ALL PRIVILEGES ON *.* TO root@158.3.2.6;

6. Connect to the MySQL instance via MySQL Workbench

7. Locate the Monarch database and select the relevant table

8. Edit the table data and remove the row entry that contains the corrupt record

9. Select Apply changes to data

10. Check within Groundwork and Configuration whether the offending record has gone

11. I stopped Groundwork services and added back the original my.cnf to /etc/my.cnf and restarted the server to complete

Advertisements

One thought on “Groundwork will not commit and Nagios pre-flight check gives a blank screen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s