Skip to content

Commit

Permalink
Fixed duff layout of wa_status
Browse files Browse the repository at this point in the history
  • Loading branch information
GilHoggarth committed Jun 30, 2020
1 parent ab81dbb commit 0917ec6
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 162 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import datetime

# output filename
outFile = 'wa-status_json.out'
outFile = 'wa-status_json.out-template'

# dashboard prefixes
dashTitle = 'WA Status'
Expand Down Expand Up @@ -130,50 +130,50 @@ def main():

# output single panels
replace_output_title(outHandle, tmpFl=panelTitle, job='ingest_metadata', title='Ingest & Metadata', h=1, w=8, x=0, y=0)
replace_output_single(outHandle, tmpFl=panelSingle, job='ingest_metadata', title='Up', h=1, w=2, x=0, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='ingest_metadata', title='CPU', h=1, w=2, x=2, y=1, thresholds='0.1,1.1', colour='#ba43a9')
replace_output_single(outHandle, tmpFl=panelSingle, job='ingest_metadata', title='Dsk', h=1, w=2, x=4, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='ingest_metadata', title='Mem', h=1, w=2, x=6, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='im-access-http', title='WWW', h=1, w=2, x=0, y=2)
replace_output_single(outHandle, tmpFl=panelSingle, job='ingest_metadata', title='Up', h=2, w=2, x=0, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='ingest_metadata', title='CPU', h=2, w=2, x=2, y=1, thresholds='0.1,1.1', colour='#ba43a9')
replace_output_single(outHandle, tmpFl=panelSingle, job='ingest_metadata', title='Dsk', h=2, w=2, x=4, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='ingest_metadata', title='Mem', h=2, w=2, x=6, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='im-access-http', title='WWW', h=2, w=2, x=0, y=3)
replace_output_title(outHandle, tmpFl=panelTitle, job='hadoop', title='Hadoop', h=1, w=8, x=8, y=0)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='Up', h=1, w=2, x=8, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='CPU', h=1, w=2, x=10, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='Dsk', h=1, w=2, x=12, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='Mem', h=1, w=2, x=14, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='Nodes', h=1, w=2, x=8, y=2)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='Under-rep', h=1, w=2, x=10, y=2)
replace_output_single(outHandle, tmpFl=panelSingleHadoopUsed, job='hadoop', title='Used', h=2, w=2, x=12, y=2)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='Up', h=2, w=2, x=8, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='CPU', h=2, w=2, x=10, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='Dsk', h=2, w=2, x=12, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='Mem', h=2, w=2, x=14, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='Nodes', h=2, w=2, x=8, y=3)
replace_output_single(outHandle, tmpFl=panelSingle, job='hadoop', title='Under-rep', h=2, w=2, x=10, y=3)
replace_output_single(outHandle, tmpFl=panelSingleHadoopUsed, job='hadoop', title='Used', h=2, w=2, x=12, y=3)
replace_output_title(outHandle, tmpFl=panelTitle, job='discovery_access', title='Discovery & Access', h=1, w=8, x=16, y=0)
replace_output_single(outHandle, tmpFl=panelSingle, job='discovery_access', title='Up', h=1, w=2, x=16, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='discovery_access', title='CPU', h=1, w=2, x=18, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='discovery_access', title='Dsk', h=1, w=2, x=20, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='discovery_access', title='Mem', h=1, w=2, x=22, y=1, thresholds='0.1,1.1', colour='#ba43a9')
replace_output_single(outHandle, tmpFl=panelSingle, job='discovery_access', title='UTR', h=1, w=2, x=16, y=2)
replace_output_single(outHandle, tmpFl=panelSingle, job='da-access-http', title='WWW', h=1, w=2, x=18, y=2)
replace_output_title(outHandle, tmpFl=panelTitle, job='services', title='Services', h=1, w=8, x=0, y=3)
replace_output_single(outHandle, tmpFl=panelSingle, job='services', title='Up', h=1, w=2, x=0, y=4)
replace_output_single(outHandle, tmpFl=panelSingle, job='services', title='CPU', h=1, w=2, x=2, y=4)
replace_output_single(outHandle, tmpFl=panelSingle, job='services', title='Dsk', h=1, w=2, x=4, y=4)
replace_output_single(outHandle, tmpFl=panelSingle, job='services', title='Mem', h=1, w=2, x=6, y=4)
replace_output_title(outHandle, tmpFl=panelTitle, job='gluster', title='Gluster', h=1, w=8, x=8, y=4)
replace_output_single(outHandle, tmpFl=panelSingle, job='gluster', title='Up', h=1, w=2, x=8, y=5)
replace_output_single(outHandle, tmpFl=panelSingle, job='gluster', title='CPU', h=1, w=2, x=10, y=5)
replace_output_single(outHandle, tmpFl=panelSingle, job='gluster', title='Dsk', h=1, w=2, x=12, y=5)
replace_output_single(outHandle, tmpFl=panelSingle, job='gluster', title='Mem', h=1, w=2, x=14, y=5)
replace_output_title(outHandle, tmpFl=panelTitle, job='solr', title='Solr', h=1, w=8, x=16, y=3)
replace_output_single(outHandle, tmpFl=panelSingle, job='solr', title='Up', h=1, w=2, x=16, y=4)
replace_output_single(outHandle, tmpFl=panelSingle, job='solr', title='CPU', h=1, w=2, x=18, y=4)
replace_output_single(outHandle, tmpFl=panelSingle, job='solr', title='Dsk', h=1, w=2, x=20, y=4)
replace_output_single(outHandle, tmpFl=panelSingle, job='solr', title='Mem', h=1, w=2, x=22, y=4)
replace_output_single(outHandle, tmpFl=panelSingle, job='solr-query', title='Query', h=1, w=2, x=16, y=5)
replace_output_title(outHandle, tmpFl=panelTitle, job='infrastructure', title='Infrastructure', h=1, w=8, x=8, y=6)
replace_output_single(outHandle, tmpFl=panelSingle, job='infrastructure', title='Up', h=1, w=2, x=8, y=7)
replace_output_single(outHandle, tmpFl=panelSingle, job='infrastructure', title='CPU', h=1, w=2, x=10, y=7)
replace_output_single(outHandle, tmpFl=panelSingle, job='infrastructure', title='Dsk', h=1, w=2, x=12, y=7)
replace_output_single(outHandle, tmpFl=panelSingle, job='discovery_access', title='Up', h=2, w=2, x=16, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='discovery_access', title='CPU', h=2, w=2, x=18, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='discovery_access', title='Dsk', h=2, w=2, x=20, y=1)
replace_output_single(outHandle, tmpFl=panelSingle, job='discovery_access', title='Mem', h=2, w=2, x=22, y=1, thresholds='0.1,1.1', colour='#ba43a9')
replace_output_single(outHandle, tmpFl=panelSingle, job='discovery_access', title='UTR', h=2, w=2, x=16, y=3)
replace_output_single(outHandle, tmpFl=panelSingle, job='da-access-http', title='WWW', h=2, w=2, x=18, y=3)
replace_output_title(outHandle, tmpFl=panelTitle, job='services', title='Services', h=1, w=8, x=0, y=5)
replace_output_single(outHandle, tmpFl=panelSingle, job='services', title='Up', h=2, w=2, x=0, y=6)
replace_output_single(outHandle, tmpFl=panelSingle, job='services', title='CPU', h=2, w=2, x=2, y=6)
replace_output_single(outHandle, tmpFl=panelSingle, job='services', title='Dsk', h=2, w=2, x=4, y=6)
replace_output_single(outHandle, tmpFl=panelSingle, job='services', title='Mem', h=2, w=2, x=6, y=6)
replace_output_title(outHandle, tmpFl=panelTitle, job='gluster', title='Gluster', h=1, w=8, x=8, y=6)
replace_output_single(outHandle, tmpFl=panelSingle, job='gluster', title='Up', h=2, w=2, x=8, y=7)
replace_output_single(outHandle, tmpFl=panelSingle, job='gluster', title='CPU', h=2, w=2, x=10, y=7)
replace_output_single(outHandle, tmpFl=panelSingle, job='gluster', title='Dsk', h=2, w=2, x=12, y=7)
replace_output_single(outHandle, tmpFl=panelSingle, job='gluster', title='Mem', h=2, w=2, x=14, y=7)
replace_output_title(outHandle, tmpFl=panelTitle, job='solr', title='Solr', h=1, w=8, x=16, y=5)
replace_output_single(outHandle, tmpFl=panelSingle, job='solr', title='Up', h=2, w=2, x=16, y=6)
replace_output_single(outHandle, tmpFl=panelSingle, job='solr', title='CPU', h=2, w=2, x=18, y=6)
replace_output_single(outHandle, tmpFl=panelSingle, job='solr', title='Dsk', h=2, w=2, x=20, y=6)
replace_output_single(outHandle, tmpFl=panelSingle, job='solr', title='Mem', h=2, w=2, x=22, y=6)
replace_output_single(outHandle, tmpFl=panelSingle, job='solr-query', title='Query', h=2, w=2, x=16, y=8)
replace_output_title(outHandle, tmpFl=panelTitle, job='infrastructure', title='Infrastructure', h=1, w=8, x=8, y=9)
replace_output_single(outHandle, tmpFl=panelSingle, job='infrastructure', title='Up', h=2, w=2, x=8, y=10)
replace_output_single(outHandle, tmpFl=panelSingle, job='infrastructure', title='CPU', h=2, w=2, x=10, y=10)
replace_output_single(outHandle, tmpFl=panelSingle, job='infrastructure', title='Dsk', h=2, w=2, x=12, y=10)


# output last singlestat panel with final ',' removed to make output json valid
replace_output_single(outHandle, tmpFl = panelSingle, job = 'infrastructure', title = 'Mem', h=1, w=2, x=14, y=6, lastPanel = True)
replace_output_single(outHandle, tmpFl = panelSingle, job = 'infrastructure', title = 'Mem', h=2, w=2, x=14, y=10, lastPanel = True)

# amend dashboard values
output(outHandle, tmpFl = panelFooter)
Expand Down
Loading

0 comments on commit 0917ec6

Please sign in to comment.