Last active
August 10, 2016 17:05
-
-
Save martinrusev/479db931649bdadeb24c2002c78f6c8e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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