I am looking to get statistics on people logged onto a Remote Desktop Application pool within a date range.
I have created a powershell script which counts the number of sessions for a specific application pool and then logs a custom event to the Application log with that figure.
On log analytics I have set up a custom field which extracts this figure from the custom event log and it is set to numeric. I then create a query to extract the data as below:
Event |
where Source == "myapp" and EventID == 1 |
project toint(MYAPPUSERCOUNT3_CF)
When I try to generate a chart then I get the error below:
The Stacked Column can't be created as you are missing a column of one of the following types: Int32, Int64, Single or Double
I can understand why this is happening because the Column is numeric and not int, but is there a way around this.
I might be approaching this the wrong way. I am thinking that I might be able to capture events from the RD gateway server that show logons to the application pool, if such an event exists. Does anyone know the event to capture as I can't find this online?
Sorry, as I am very new to Log Analytics.