You can export data from dbWatch through http for easy access by others (tools or humans). Data can be made available in several formats, most notably html, json and csv.

To create a simple export containing an overview of your environment, click “New” in the Configure Webserver view.

Type in an url and choose the dataexport feature. Click OK.

When configuring the export there are 4 topics that you can modify.

engine

The engine property specifies the type of query you are going to use to generate data. Legal values are currently sql and dbwql.

query

The actual query to run in order to generate data. This should be a dbwql query if engine is set to “dbwql”, or a sql query if engine is set to “sql”.

anchor

If engine is set to “sql”, then this should be a dbwql query that returns the instance to execute the query on. If engine is set to dbwql, then this is optional.

In our example, we want to list all our instances and their corresponding platforms, so we enter the query instance->i/displayname{}/$i/platform_info. We keep the default values for the other properties.
Click save.

If the Webserver is defined under localhost:8080, the export will be available as html under http://localhost:8080/overview/anyfile.html and as json under http://localhost:8080/overview/anyfile.json.

Example html

Example json

The web page will run the query every time it is accessed and display the result.

Export from Dbwql Console

Sometimes when working in the Dbwql Console, you have a query that you want to export. Here we have a query giving us details about different alarms.

This can be done easily with the “Make available as webpage” menu.

Specify an url, f.ex alarmlist.

As you can see, the value for the query property is our query from earlier.

Click save, and the result will be available as a web page on http://localhost:8080/alarmlist/anyfile.html

And as json on http://localhost:8080/alarmlist/anyfile.json

Export from SQL Worksheet

Sometimes when working in the SQL Worksheet, you have a query that you want to export. Here we have a query giving us details from sysdatabases.

This can be done easily with the “Make available as webpage” menu.

Specify an url, f.ex sysdatabases.

As you can see, the value for the query property is our sql query from earlier and engine is set to “sql”.

Click save, and the result will be available as a web page on http://localhost:8080/sysdatabases/anyfile.html

And as json on http://localhost:8080/alarmlist/sysdatabases.json

← Custom headings / Issues and troubleshooting →

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment