Login Cart  Cart
logo

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline fward  
#1 Posted : Wednesday, April 27, 2011 11:38:04 PM(UTC)
fward
Rank: Newbie

Joined: 4/27/2011(UTC)
Posts: 4
Location: Montreal

Hi, currently evaluating VisualCron for automating some IT related processes...

One thing i noticed, is that the log are conveniently stored in an SQL Server compact database. Great! For advanced diagnostic when we run into problems, the UI can be a little limiting, so I'm thinking "No problem, I'll just go straight in the database".

Oh whoops, its password protected :) And I don't see the password in any config file or anything.

Is it possible to get access to that database?

Thanks!
Offline Support  
#2 Posted : Thursday, April 28, 2011 10:50:10 AM(UTC)
Support
Rank: Administration

Joined: 2/23/2008(UTC)
Posts: 7,582

Thanks: 336 times
Was thanked: 196 time(s) in 187 post(s)
We have password protected the file because some users find the output information (which is stored in database) sensitive.

The best way to access the database is through the VisualCron API. With a few lines you can logon to the VisualCron Server and then access the database. You could then, if you want to, create a simple script that extracts the data that is relevant and insert into your own database.

Please let us know if you need any help.
Henrik
Support
http://www.visualcron.com

Please like VisualCron on facebook!
Offline fward  
#3 Posted : Thursday, April 28, 2011 4:59:06 PM(UTC)
fward
Rank: Newbie

Joined: 4/27/2011(UTC)
Posts: 4
Location: Montreal

Yeah that would be an acceptable workaround.

Though is there something special to do to access the logs from the API? I just tried the following code:

Code:

Client client = new Client();

Connection connection = new Connection();
connection.Address = "sadshh01";
connection.ConnectionType = Connection.ConnectionT.Remote;
connection.UseADLogon = true;

var server = client.Connect(connection);

var history = server.Log.GetAll();


And it returns nothing. Note that Ive been playing with other parts of the API in the same application to get jobs, tasks, etc and that all work, so I assume my connection is done correctly?

Thanks!
Offline Support  
#4 Posted : Thursday, April 28, 2011 5:20:52 PM(UTC)
Support
Rank: Administration

Joined: 2/23/2008(UTC)
Posts: 7,582

Thanks: 336 times
Was thanked: 196 time(s) in 187 post(s)
This is VB.NET but probably can convert it:

Quote:
' get a list of historic results
Dim jl As List(Of LogTaskHistoryClass) = ConnectionAPI.CurrentServer.Log.GetTaskHistory(TaskId, thisMorning, Now)


Use the "ExecutionId" property to retrieve the specific output:

Quote:
Private Function GetOutput(ByVal executionId As Guid, ByVal bolStandardOutput As Boolean) As String
If Not dicOutput.ContainsKey(executionId) Then
Dim ltoc As LogTaskOutputClass = ConnectionAPI.CurrentServer.Log.GetTaskOutput(executionId)

dicOutput.Add(executionId, ltoc)
End If

If bolStandardOutput Then
Return dicOutput(executionId).StandardOutput
Else
Return dicOutput(executionId).StandardError
End If
End Function
Henrik
Support
http://www.visualcron.com

Please like VisualCron on facebook!
Offline fward  
#5 Posted : Thursday, April 28, 2011 6:25:01 PM(UTC)
fward
Rank: Newbie

Joined: 4/27/2011(UTC)
Posts: 4
Location: Montreal

There we go, that worked :)

Thanks!
Offline klewis10367  
#6 Posted : Wednesday, June 22, 2011 7:48:41 PM(UTC)
klewis10367
Rank: Advanced Member

Joined: 9/14/2009(UTC)
Posts: 148
Location: Myrtle Beach

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
I am not a programmer and have no idea how to use the API..is there anyway the password can be given to access the SQL Server Compact Editon database so i can look at logs?
Offline ErikC  
#7 Posted : Thursday, June 23, 2011 7:15:18 AM(UTC)
ErikC
Rank: Administration

Joined: 2/26/2008(UTC)
Posts: 1,192
Netherlands
Location: Amsterdam

Thanks: 54 times
Was thanked: 98 time(s) in 84 post(s)
Originally Posted by: klewis10367 Go to Quoted Post
I am not a programmer and have no idea how to use the API..is there anyway the password can be given to access the SQL Server Compact Editon database so i can look at logs?

I don't think the password will be given. And if support will give it to you it wil not be on the forum.
The golden rule for a password is to keep it hidden Cool.

Regards
Erik
Uses Visualcron since 2006.
Offline Support  
#8 Posted : Thursday, June 23, 2011 2:58:25 PM(UTC)
Support
Rank: Administration

Joined: 2/23/2008(UTC)
Posts: 7,582

Thanks: 336 times
Was thanked: 196 time(s) in 187 post(s)
Originally Posted by: klewis10367 Go to Quoted Post
I am not a programmer and have no idea how to use the API..is there anyway the password can be given to access the SQL Server Compact Editon database so i can look at logs?


The main reason that we do not give the password is that we then bypass VisualCron security. The only way to access the database is when you have already logged on VisualCron - through client or API. Then we can give the information as the data itself may contain confidential output.
Henrik
Support
http://www.visualcron.com

Please like VisualCron on facebook!
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

footer
Follow VisualCron on Facebook Follow VisualCron on Twitter   Join the VisualCron group on LinkedIn neteject.com anyconnect.net millimetrics.com xendapp.com