Skip to content

Instantly share code, notes, and snippets.

@martinrusev
Last active August 10, 2016 17:05
Show Gist options
  • Select an option

  • Save martinrusev/479db931649bdadeb24c2002c78f6c8e to your computer and use it in GitHub Desktop.

Select an option

Save martinrusev/479db931649bdadeb24c2002c78f6c8e to your computer and use it in GitHub Desktop.
import random
distros = ['debian', 'centos', 'rails', 'django', 'ubuntu','redis', 'mysql', 'mongo', 'db']
providers = ['do-ams','do-nyc', 'ec2-eu-west', 'ec2-us-east', 'do-ams', 'do-sf', 'do-sgp']
region = [1, 2, 3]
for i in range(5):
distro = random.choice(distros)
provider = random.choice(providers)
server_name = "{0}-{1}{2}".format(distro, provider, random.choice(region))
s['name'] = server_name
v = random.uniform(6.0, 75.7)
server_data = {
'server': s,
'last_check': last_check,
'unit': unit,
'value': v,
'field': field
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment