opserver / Opserver

Stack Exchange's Monitoring System
https://opserver.github.io/Opserver/
MIT License
4.51k stars 827 forks source link

Run Console #284

Closed gmbeas closed 6 years ago

gmbeas commented 7 years ago

Hello, how can you deal with console?

how to declare to execute the same of mvc, but in console?

public static SettingsProvider Settings => SettingsProvider.Current;

`var a1= Settings.SQL;
var a2 = SQLInstance.Get("DB");
var a3 = a2.Databases.SafeData(true);

return 0
`

Thank

NickCraver commented 6 years ago

I'm not sure of your goals here - the polling engine isn't fully decoupled from the web app (though this will likely happen in the move to ASP.NET Core), so for now: Console usages really aren't supported.