What is the correct Stardog's HTTP monitoring via Watchdog URL ?

5 views
Skip to first unread message

oklma...@gmail.com

unread,
May 5, 2015, 1:34:59 AM5/5/15
to sta...@clarkparsia.com
I have a database in Stardog named "demo". I used the Enterprise Trial version (3.0.1) on Windows with JDK 1.8

I can use JConsole via JMX to see the "demo" database details. From Stardog's Admin console, I am also able to click on the "Monitor" tab to see the server statistics.


"You can also access information from Watchdog in the web console for the database, or by performing a GET on /{db}/watchdog which will return a simple JSON object containing the information available via JMX."

I am interested in trying out the HTTP call to get the JSON response. On Chrome, I am logged in Admin Console as the default admin/admin and I set the browser's URL to http://localhost:5820/demo/watchdog  (which effectively does a HTTP GET), but I get a HTTP 404.

When I used Chrome's Developer Tools to look at the HTTP calls that happens in the Stardog Admin, I notice that there are calls to http://localhost:5820/watchdog which seems to return a JSON object with the information. However, I do not see a database name being specified there.

Anyone knows what is the correct HTTP URL to call ?

Thanks.
Kean

Michael Grove

unread,
May 5, 2015, 7:53:30 AM5/5/15
to stardog
On Tue, May 5, 2015 at 1:34 AM, <oklma...@gmail.com> wrote:
I have a database in Stardog named "demo". I used the Enterprise Trial version (3.0.1) on Windows with JDK 1.8

I can use JConsole via JMX to see the "demo" database details. From Stardog's Admin console, I am also able to click on the "Monitor" tab to see the server statistics.


"You can also access information from Watchdog in the web console for the database, or by performing a GET on /{db}/watchdog which will return a simple JSON object containing the information available via JMX."

That's a typo in the docs.
 

I am interested in trying out the HTTP call to get the JSON response. On Chrome, I am logged in Admin Console as the default admin/admin and I set the browser's URL to http://localhost:5820/demo/watchdog  (which effectively does a HTTP GET), but I get a HTTP 404. 

When I used Chrome's Developer Tools to look at the HTTP calls that happens in the Stardog Admin, I notice that there are calls to http://localhost:5820/watchdog which seems to return a JSON object with the information. However, I do not see a database name being specified there.

This is the correct URL.  The database specific information is returned in the JSON object from that call; in your case, there will be a key 'demo' whose value is a map of the data for that database.

Cheers,

Mike
 

Anyone knows what is the correct HTTP URL to call ?

Thanks.
Kean

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

oklma...@gmail.com

unread,
May 5, 2015, 11:09:02 AM5/5/15
to sta...@clarkparsia.com
Well, I would not get any JSON response if I hit the URL http://localhost:5820/watchdog directly. I am not sure how the Stardog Admin console does it, but it seems to work for Stardog Admin. Perhaps I am missing some parameters ?

Also, how do I specify the specific database information that I want to get because URL http://localhost:5820/watchdog does not allow me to specify the database name.

Michael Grove

unread,
May 5, 2015, 11:12:10 AM5/5/15
to stardog
On Tue, May 5, 2015 at 11:09 AM, <oklma...@gmail.com> wrote:
Well, I would not get any JSON response if I hit the URL http://localhost:5820/watchdog directly. I am not sure how the Stardog Admin console does it, but it seems to work for Stardog Admin. Perhaps I am missing some parameters ?

Can you provide the command, using something like cURL or WGET, that does not work? 
 

Also, how do I specify the specific database information that I want to get because URL http://localhost:5820/watchdog does not allow me to specify the database name.

The Watchdog service is for the DBMS, not a single database, so it will return information about all of the databases.  The database specific information is returned in the JSON object from that call; in your case, there will be a key 'demo' whose value is a map of the data for that database.

Cheers,

Mike
 




I am interested in trying out the HTTP call to get the JSON response. On Chrome, I am logged in Admin Console as the default admin/admin and I set the browser's URL to http://localhost:5820/demo/watchdog  (which effectively does a HTTP GET), but I get a HTTP 404. 

When I used Chrome's Developer Tools to look at the HTTP calls that happens in the Stardog Admin, I notice that there are calls to http://localhost:5820/watchdog which seems to return a JSON object with the information. However, I do not see a database name being specified there.

This is the correct URL.  The database specific information is returned in the JSON object from that call; in your case, there will be a key 'demo' whose value is a map of the data for that database.

Cheers,

Mike
 

--

oklma...@gmail.com

unread,
May 6, 2015, 5:09:29 AM5/6/15
to sta...@clarkparsia.com
Hi Michael,

Thanks for the reply. Interesting that when we use WGET, we can get a JSON response.  Trying POSTMAN on Chrome also works, but providing that URL directly on Chrome browser does not.

WGET works for me, so I am happy with this approach.

Regards,
Kean

Michael Grove

unread,
May 6, 2015, 6:23:16 AM5/6/15
to stardog
On Wed, May 6, 2015 at 5:09 AM, <oklma...@gmail.com> wrote:
Hi Michael,

Thanks for the reply. Interesting that when we use WGET, we can get a JSON response.  Trying POSTMAN on Chrome also works, but providing that URL directly on Chrome browser does not.

Just pasting the URL in your browser is probably requesting HTML, which the watchdog endpoint does not serve.

Cheers,

Mike
Reply all
Reply to author
Forward
0 new messages