# # Check the result # if ok: print('Dashboard created successfully') else: print(res) sys.exit(1) # # Make a Copy the just created dasboard, this time applying it to cassandra in # the dev namespace # # Name of the dashboard to copy dashboardCopy = "Copy of {}".format(dashboardName) # Filter to apply to the new dashboard. Same as above. dashboardFilter = "kubernetes.namespace.name != prod" print('Creating dashboard from dashboard') ok, res = sdclient.create_dashboard_from_dashboard(dashboardCopy, dashboardName, dashboardFilter) # # Check the result # if ok: print('Dashboard copied successfully') else: print(res) sys.exit(1)
# Check the result # if res[0]: print 'Dashboard created successfully' else: print res[1] sys.exit(1) # # Make a Copy the just created dasboard, this time applying it to cassandra in # the dev namespace # # Name for the dashboard to create dashboardName = "API test - cassandra in dev" # Name of the dashboard to copy dashboardToCopy = "API test - cassandra in prod" # Filter to apply to the new dashboard. Same as above. dashboardFilter = "kubernetes.namespace.name = dev and proc.name = cassandra" res = sdclient.create_dashboard_from_dashboard(dashboardName, dashboardToCopy, dashboardFilter) # # Check the result # if res[0]: print 'Dashboard copied successfully' else: print res[1] sys.exit(1)
) # the filter specifying what this dasboard appies to. # Remember that here you can use combinations of any # segmentation criteria that you find in the Sysdig # Cloud explore page. # # Check the result # if res[0]: print 'Dashboard created successfully' else: print res[1] sys.exit(1) # # Make a Copy the just created dasboard, this time applying it to cassandra in the dev namespace # res = sdclient.create_dashboard_from_dashboard( "API test - cassandra in dev", # The name we're giving to the new dashboard. "API test - cassandra in prod", # The view we're copying. "kubernetes.namespace.name=dev and proc.name = cassandra" ) # the filter specifying what this dasboard appies to. # # Check the result # if res[0]: print 'Dashboard copied successfully' else: print res[1] sys.exit(1)