Monthly Archive for May, 2008

Zabbix – IReport – Custom Reporting Tutorial – Part 1

This is the first  art of a series of articles to get people started with JasperReports and connected to the Zabbix  health monitoring system. In the second part I’ll explain how to access your database to run simple queries and show them in a very simple report created with iReport.

The first thing we need to do to get moving is to have iReport ready. So if you haven’t got it installed do so. Next step is to have the database driver in your iReport library folder. This means that you will need a jdbc jar packaged driver copied to the ./lib/ directory of iReport’s base folder. This step is really important not doing so will not allow you to connect to the database. Most databases provide their own jdbc driver, there are many tutorials and references that speak about jdbc.

Now is the time to configure access to your database. You have to go to the menu “Data -> Connections/Datasources”. Then you must click the “New” button.

When you get this dialog, the first thing to do is to give a name to the connection “Name”. Next is to specify the driver to connect to your database.Then you’ll have to modify the JDBC URL to access your database (You can use the wizard to do this too). Finally you must specify the username and password with permission to get access to the database. It’s convenient to test the connection before saving.

With your connection ready, is time to query the database. In my case I will be using PostgreSQL and I will build a simple query to get the database table names. For this you must go to the menu “Data -> Report Query”.

When you insert your SQL query, in my case “SELECT * FROM pg_tables ORDER BY 1” iReport automatically gets the metadata for your query and stores them as report fields so you can use them during the development of your report.

Finally with the retrieved report fields we can now create our report. This is the result:

Migrate WSUS Database from Domain Controller to SQL 2005

Okay, so I had made a newbie mistake when installing WSUS into our environment about a year ago. This may occur if you have a limited number of machines for running a small network.

I installed WSUS on top of a domain controller. Everything seemed to work fine in this configuration; however, I wanted to move the database to another SQL Server so that I could better automate reporting of which systems have which updates, etc. Turns out, that it is not very straight forward on how to move the database from a domain controller to another SQL server.

Here is my solution.

I followed the instructions here, but had to modify them slightly.

Migrate WSUS from Local SQL  to Remote SQL Server

The first modification was to ATTEMPT to install SQL Server database services. This install sqlcmd.exe which will be needed for the procedure listed above. Since it is on a domain controller, the SQL Server install will fail.

Once you get to the message above, just hold your horses and switch to a command prompt after having stopped Windows Update Services and the IIS Admin service.

Execute the command listed in the Microsoft article.

Reattach the database on the remote system.

Add the machine account in SQL Server (e.g., DOMAINAME\machinename$) to the SUSDB. Make sure the role is as the Microsoft article suggested.

Next edit the registry as the article suggested. I added my remote server name, and there was one additional key that I changed to a 1. The key was named something like ServerIsRemote with a value of 0. I changed that to a 1.

Rebooted the front end WSUS server and everything worked like a champ after that.

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!