I have a team of Unix admins, each of which manages multiple applications. I created a CSV lookup file that contains the name of the application, the primary admin responsible for it and one or more backup admins in case the primary is unavailable. It is very useful to keep track of who is doing what, and who to assign a new app to when a new one comes in.
I'm able to create a simple bar chart showing the number of apps assigned to each primary admin, but I'm not having any luck in getting the number of admins that are a backup to each project.
Here is an example of my CSV file:
Application,Primary,Backup1,Backup2
App1,Tom,Dick,Harry
App2,Dick,Tom,
App3,Jim,Harry,Fred
App4,Fred,Tom,
App5,Tom,Fred,Harry
What I would like to see is a list of each admin and a count of apps each one is a primary for plus a count of apps they are a backup for, something like:
Admin Primary Backup
Tom 2 2
Dick 1 1
Harry 0 3
Fred 1 2
It's pretty easy to get a count of apps each one is a primary for:
| inputlookup AdminAppSupport.csv| stats count as "Primary Apps" by Primary
| sort -"Primary Apps"
But all my attempts to do a count of admins that are in Backup1 or Backup2 fail.
Any pointers would be greatly appreciated.
... View more