Good Morning All,
I’m attempting to create a POC dashboard to help display some Security statistics and i’m running into some issues.
Overview:
I’m looking to create a Security Dashboard to displays monthly and annual line graph data.
Configuration:
I have a script that will query SAAS API and download the metrics every 5 minutes.
$annualResponse.data | gm
TypeName: System.Management.Automation.PSCustomObject
Name MemberType Definition
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
computer NoteProperty System.Management.Automation.PSCustomObject computer=@{connector_guid=guid; hostname=hostname; external_ip=67.230.213.66; active=True; network_addresses=System.Object; links=}
connector_guid NoteProperty string connector_guid=44a2be60-a752-4e22-9659-31f244b821db
date NoteProperty datetime date=7/14/2020 8:57:41 AM
event_type NoteProperty string event_type=Microsoft Excel compromise
event_type_id NoteProperty long event_type_id=1107296263
file NoteProperty System.Management.Automation.PSCustomObject file=@{disposition=Unknown; identity=; parent=}
group_guids NoteProperty Object group_guids=System.Object
id NoteProperty long id=1826833066811084412
severity NoteProperty string severity=High
start_date NoteProperty datetime start_date=7/14/2020 8:48:56 AM
start_timestamp NoteProperty long start_timestamp=1594738136
timestamp NoteProperty long timestamp=1594738661
timestamp_nanoseconds NoteProperty long timestamp_nanoseconds=0
Next I setup a New-UDMontitor like this:
. ‘C:\Dev\Security\security-results.ps1’
New-UDPage -Name “Home” -Icon home -Content {
New-UdRow { New-UdColumn -Size 4 -Content { New-UdRow { New-UdColumn -Size 4 -Content { New-UDMonitor -Title "Total Detections" -Type Line -DataPointHistory 20 -RefreshInterval 15 -ChartBackgroundColor '#5955FF90' -ChartBorderColor '#FF55FF90' @Colors -Endpoint { ($monthlyResponse| Select-Object -ExpandProperty data).Count | Out-UDMonitorData } } } } }
}
When I run this variable manually here are my X and Y
PS C:\Users\adam> ($monthlyResponse| Select-Object -ExpandProperty data).Count | Out-UDMonitorData
{
“y”: 55,
“x”: “2020-07-14T15:46:08.799127Z”
}
On my Dashboard, i’m hoping to have the vertical column represent the number of malware detection’s, and the horizontal column show the month.
Thanks for reviewing this!