Graphing a two state value
Posted: Wed Jun 07, 2023 5:39 am
Hi
We are developing a powershell plugin script for use with ncpa that checks a value is set in the windows registry:
$FWStatus = Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\" | Select-Object EnableFirewall
#$FWStatus.EnableFirewall
#$FWStatus.EnableFirewall
if ($FWStatus.EnableFirewall -eq 1)
{
Write-Output "OK: Firewall Enabled"
exit 0
}
else
{
Write-Output "CRITICAL: Firewall Disabled"
exit 2
}
Is there any special graph for a two state service eg Boolean, or will I need to return the "EnableFirewall" value which will be 1 or 0 and simply graph those states?
Thanks for your help
We are developing a powershell plugin script for use with ncpa that checks a value is set in the windows registry:
$FWStatus = Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\" | Select-Object EnableFirewall
#$FWStatus.EnableFirewall
#$FWStatus.EnableFirewall
if ($FWStatus.EnableFirewall -eq 1)
{
Write-Output "OK: Firewall Enabled"
exit 0
}
else
{
Write-Output "CRITICAL: Firewall Disabled"
exit 2
}
Is there any special graph for a two state service eg Boolean, or will I need to return the "EnableFirewall" value which will be 1 or 0 and simply graph those states?
Thanks for your help