Forum Discussion
GouravIN
Jul 19, 2019Brass Contributor
Render Piechart
Hi All, I want to create a pie chart that can populate the count of two types VMs that has either security or critical patch missing. Like : - I have 20 VM and 15 have Critical patch missing whe...
- Jul 22, 2019
Update | where TimeGenerated >= ago(1d) | where (Classification == "Security Updates" or Classification == "Critical Updates") | where UpdateState == "Needed" | extend su = iif(Classification=="Security Updates", 1,0) | extend cu = iif(Classification=="Critical Updates", 1,0) | summarize dcount(su), dcount(cu) by Computer | where dcount_cu > 1 and dcount_su > 1 | count
CliveWatson
Microsoft
In a table, this would work (not Pie chart)
Update | where TimeGenerated >= ago(1d) | where (Classification == "Security Updates" or Classification == "Critical Updates") | where UpdateState == "Needed" | summarize by Classification, Computer | evaluate pivot(Classification)
or , this that allows you to see when > 1 for the two columns?
Update | where TimeGenerated >= ago(1d) | where (Classification == "Security Updates" or Classification == "Critical Updates") | where UpdateState == "Needed" | extend su = iif(Classification=="Security Updates", 1,0) | extend cu = iif(Classification=="Critical Updates", 1,0) | summarize dcount(su), dcount(cu) by Computer | where dcount_cu > 1 and dcount_su > 1
GouravIN
Jul 22, 2019Brass Contributor
CliveWatson Thank you very much for the help.
Sir, Is it possible to count server numbers that has security and Critical patches missing.
Like, I have total 20 servers and 15 has security and 8 has critical patches missing. So i want server count that has both of patches missing.
Update
| where TimeGenerated >= ago(1d)
| where (Classification == "Security Updates" or Classification == "Critical Updates")
| where UpdateState == "Needed"
| extend su = iif(Classification=="Security Updates", 1,0)
| extend cu = iif(Classification=="Critical Updates", 1,0)
| summarize dcount(su), dcount(cu) by Computer
| where dcount_cu > 1 and dcount_su > 1
| project Computer
| print Total_Server = count(project Computer)
when I used project Computer that populated all computer name. But I want total count of Computer, if somehow i can achieve this. That would be the best answer of my question.
Thanks in advance :)
- CliveWatsonJul 22, 2019Microsoft
Update | where TimeGenerated >= ago(1d) | where (Classification == "Security Updates" or Classification == "Critical Updates") | where UpdateState == "Needed" | extend su = iif(Classification=="Security Updates", 1,0) | extend cu = iif(Classification=="Critical Updates", 1,0) | summarize dcount(su), dcount(cu) by Computer | where dcount_cu > 1 and dcount_su > 1 | count
- GouravINJul 22, 2019Brass Contributor
Ahh.... I missed this simple thing.
CliveWatson Thanks a lot Sir for helping me here :)