cloudpassage / don-bot

Don-Bot, the Halo Slackbot
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

'donbot tell me about group zyz' reports server counts #30

Closed ashmastaflash closed 6 years ago

ashmastaflash commented 6 years ago

Currently, donbot tell me about group xyz reports like this:

---------------------------
Group:
  Name:         DB
  Group Path:   Acme Industries/Retail/Supply Chain/Prod/DB
  Group ID:     blahblah
  Tag:          DB
  Description:  None
    ----------------------------------------
    Policy:
      Name:         SupplyChain Prod DB
      Policy ID:    blahblah
      Policy type:   Firewall 
      Description:  Policy to protect production Supply Chain application DB servers
    ----------------------------------------
...

We need to report server counts for groups, so it should be made to look like this:

---------------------------
Group:
  Name:         DB
  Group Path:   Acme Industries/Retail/Supply Chain/Prod/DB
  Group ID:     blahblah
  Tag:          DB
  Description:  None
  Server Counts:
    Total: 30
    Active: 25
    Missing: 3
    Deactivated: 2
    ----------------------------------------
    Policy:
      Name:         SupplyChain Prod DB
      Policy ID:    blahblah
      Policy type:   Firewall 
      Description:  Policy to protect production Supply Chain application DB servers
    ----------------------------------------
...
eatwithforks commented 6 years ago

https://github.com/cloudpassage/halocelery/pull/12