Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- # Description: mc netdata python.d module
- import json
- # Update only every 5 seconds because collection takes in excess of
- # 100ms sometimes, and most people won't care about second-by-second data.
- update_every = 5
- ORDER = [
- 'players',
- ]
- CHARTS = {
- 'players': {
- 'options': [None, 'Minecraft Users', 'users'],
- 'lines': [
- ['players', 'Users', 'absolute', 1, 1]
- ]
- }
- }
- def test():
- import requests
- url = 'https://api.minetools.eu/ping/hypixel.net'
- data = requests.get(url).json()
- print(data)
- if __name__ == '__main__':
- test()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement