Author Topic: [python] bts_tools witness monitoring tools for BitShares 2.0  (Read 5591 times)

0 Members and 1 Guest are viewing this topic.

Offline roadscape

http://cryptofresh.com  |  witness: roadscape

Offline cube

  • Hero Member
  • *****
  • Posts: 1404
  • Bit by bit, we will get there!
    • View Profile
  • BitShares: bitcube
For those that don't know the bts_tools package, the best description can probably be given with screenshots (a picture is worth a thousand words!): http://bts-tools.readthedocs.org/en/latest/monitor.html#screenshots

Let me know what you think!

The screenshots are outdated.  The dates are in 2014 and the terms used are for BTS1.  Could you please put up screenshots for BTS2?

ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
BitShares committee member: abit
BitShares witness: in.abit

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Congratulations! You've persistently improved these tools starting from ground level. Good Job!

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc

Offline bytemaster

For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline wackou

For those that don't know the bts_tools package, the best description can probably be given with screenshots (a picture is worth a thousand words!): http://bts-tools.readthedocs.org/en/latest/monitor.html#screenshots

-------------------------------------

A bit later than what I originally hoped for, here comes the bts_tools package ported to support graphene clients, in this case BitShares 2.0.

Given the new asynchronous model of communication via websockets, I had to refactor more than originally planned, but the bulk of it is now done, and I learnt quite a great deal in the process (wanted to look into async programming in python for some time now, and this was the perfect occasion!). Thanks go to Xeroc for writing his python-graphenelib module, that was extremely helpful in getting me bootstrapped and understanding how it all worked.

Please bear in mind that there are probably still a few things not working, or not working properly. The basic functionality is there, though:
 - cpu/ram/network connections graph
 - feeds publishing, using either a time interval (as before) or a time slot (as currently setup in the telegram chat)
 - some other plugins: wallet_state, voted_in, online, network_connections

notably missing:
 - detection of blocks missed

So for the non-faint of heart that don't mind a few quirks, you can install the tools as usual with:

Code: [Select]
$ pip3 install bts_tools
and you should get version >= 0.3. The documentation, although not updated yet, should still mostly apply to everything: http://bts-tools.readthedocs.org/

What you can do then:
 - bts2 build [tag]: builds the latest version, or a given version
 - bts2 run: runs the witness client
 - bts2 run_cli: runs the cli wallet
 - bts2 monitor: launch the monitoring tools

Things to watch out for in this release:
 - the config file is still sensitive, ie: you need to configure everything properly, there is very little checking. The default config.yaml file comes with the minimum required fields you need to configure to get something working, edit at will. If you had a previous config.yaml file, it is highly recommended to delete it beforehand.
 - in particular, you need to setup correctly an api_access.json file (as described here: https://github.com/BitShares/bitshares-2#accessing-restricted-apis - the saltpass.py script can be found here: https://github.com/BitShares/bitshares-2/blob/bitshares/programs%2Fwitness_node%2Fsaltpass.py) and configure your config.ini file to use it. This is needed to get access to restricted APIs of the client such as the network one.

What I plan to do next is to iron out the support, port the remaining monitoring plugins and stabilize the code base. Support for Muse clients should also come very soon :)

Let me know what you think!
Please vote for witness wackou! More info at http://digitalgaia.io