Jump to content
Mr_McFearson

Codius Monitor for hosts!

Recommended Posts

Alright guys, so I was browsing over at the Codius Gitter and I saw that somebody created a neat little package to simplify checking your Codius Hosts.

All credit goes to https://github.com/opahopa "Opahopa" for creation of this masterpiece.

https://codiusmonitor.com/panel/client -- You can register your account and then set up your client through your SSH.


I have it all set up with my host, and even confirmed that it reads in real time each individual process, which can be easily viewed for troubleshooting, and has an option that you can change your host cost.

 

codius monitoring.jpg

codius hosts monitoring.jpg

Share this post


Link to post
Share on other sites

When running the ./cmoncli command, I get the following scrolling error:

 

File "cmonitorcli/services/db_service.py", line 81, in write_pods_status

TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

ERROR|03/Sep/2018 17:26:53|utils|get_fee|31|'NoneType' object has no attribute 'group'

INFO|03/Sep/2018 17:26:53|system_service|report_codius|91|Codius system info: {'version': '1.2.5', 'pods': [], 'memory': {'total': 15877, 'used': 487}, 'fee': None}

A BaseException occurred on writing pods history to sqllite: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Traceback (most recent call last):

 

Any ideas?

Share this post


Link to post
Share on other sites

So essentially you're granting this website access to your Codius host ? And it does stuff for you based on the GUI functions you choose ?

I see this as a huge security flaw, as if it has the ability to change your Codiusd config file for you, it means it would also have access to your .moneyd.json file and can read your XRP secret key, and therefore has full access to your current and all future funds.

If you can provide some clarity on how the tool actually works, and what level of security there is, it definitely could prove to be a very handy thing to use. Especially for those host owners who aren't as savvy with Linux or command line tools.

Share this post


Link to post
Share on other sites

Good questions to ask, I've relayed them over to Opahopa @ Gitter. I checked yesterday and the code for the Monitor is open sourced, here is a link to his github.

https://github.com/opahopa/cmonitorcli

If anybody more code-savvy than I would like to take a look at that and perhaps understand it?
Just keep in mind, that he originally created the project for himself, but thought it to be useful for quite a few others and this is why he has created this.

Edited by Mr_McFearson

Share this post


Link to post
Share on other sites
10 hours ago, hamsumwich said:

When running the ./cmoncli command, I get the following scrolling error:

 

File "cmonitorcli/services/db_service.py", line 81, in write_pods_status

TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

ERROR|03/Sep/2018 17:26:53|utils|get_fee|31|'NoneType' object has no attribute 'group'

INFO|03/Sep/2018 17:26:53|system_service|report_codius|91|Codius system info: {'version': '1.2.5', 'pods': [], 'memory': {'total': 15877, 'used': 487}, 'fee': None}

A BaseException occurred on writing pods history to sqllite: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Traceback (most recent call last):

 

Any ideas?

I know there was an additional file that was needed to edit (on the right hand side of the Client tab) that I went and added in as well, so I did that anyway and it worked on the first try for me. I'm unsure of that error.

 

Share this post


Link to post
Share on other sites

Opahopa wanted me to let you guys know his account is awaiting activation here at XRPchat, most likely about 8 more hours, but he will update this post with answers to any questions you all might have.

Edited by Mr_McFearson

Share this post


Link to post
Share on other sites

Hi everyone!

Thank you @Mr_McFearson for starting this thread.

Just got my account activated,

At first i need to notice that I might have published it a bit early, but since i was using it myself for almost a month though there is no reason to wait much longer. 

On 9/3/2018 at 10:29 PM, hamsumwich said:

When running the ./cmoncli command, I get the following scrolling error:

Fixed yesterday, the issue appeared because there are 3 different names for a variable which is setting a codiusd fee. (COST_PER_MONTH, etc.). Supporting all now.

Regarding trust and security concerns:

Source code of the client software is available here: https://github.com/opahopa/cmonitorcli . Anyone welcome to check it and insure that it doesn't access any sensitive information such as `.moneyd.json`. Need to note that originally i was building this project for own usage and the codebase isn't the best :) (didn't spend time on documenting, etc) If you want any comments on code please contact me. 

Workflow is simple: client software open a secure websocket connection with the API which is mirrors the requests to user interface and the over way around. All the data transferred over SSL. Client is only accepting a limited amount of commands (https://github.com/opahopa/cmonitorcli/blob/master/services/monitor_service.py) and interpret them by itself, which means nothing except that particular commands can be executed on the server through this client (basically it's changing the codius fee and restarting the codiusd-related services at the moment) => even in case if your https://codiusmonitor.com account will get compromised, there is no harm can be done except changing a fee on your hosts / restarting the services. It's like a firewall with only whitelisted IPs(commands) having access to server.

In addition, no data is stored at the codiusmonitor.com servers except of the authorization data. "cmoncli"  save the stats directly at your server in open sqlite database.

I guess in terms of real danger for codius hosts the actual issue now is that wallet secret is openly stored  in `.money.json` and the servers list is openly available. (vulnerabilities scanning, brutforce)

Happy to address any further questions.

If you have any issues with the software or ideas for improvements please contact me at: contact@support.codiusmonitor.com 

Twitter for future updates https://twitter.com/codiusmonitor ;)

Edited by opahopa

Share this post


Link to post
Share on other sites
29 minutes ago, hamsumwich said:

When I open my dashboard, I'm not seeing anything except for a red message stating: socket status: error: 1006

Any idea what's going on?

hey i'm doing some updates right now, please check after an hour ;)

btw in case of 1006 error try to re-login.  but actually this must be solved in the update coming now.

Update: Done by now.

Edited by opahopa

Share this post


Link to post
Share on other sites

If you've been experiencing issues with codiusmonitor.com - it was because of the tricky bug in one of the API's packages which appears only on high volume of connections.

Solved and stable now, sorry for inconvenience.

Share this post


Link to post
Share on other sites

Hey,

Apologize for the problems you might faced during past week - probably it was too early to publish this project and there were a few tricky bugs which appeared only with higher load. Everything was fixed.

Published some updates today: https://codiusmonitor.com/panel/news

Plans:

  • Moneyd payments channels cleanup
  • Fail2Ban installer
  • integrating codiusd installer
Edited by opahopa

Share this post


Link to post
Share on other sites
18 hours ago, fon462 said:

How long does your upload test run??  I tried it and its been running now for 2 hours.

As mentioned on gitter, you need to update your codiusmonitor client first, in order for new functions to work at your server. Please follow the manual at https://codiusmonitor.com/panel/client . The upload test itself runs for maximum 60 seconds, however if your client is not updated it will keep showing "loading" because the old client can't interpret "upload test" command.

Share this post


Link to post
Share on other sites
4 hours ago, opahopa said:

As mentioned on gitter, you need to update your codiusmonitor client first, in order for new functions to work at your server. Please follow the manual at https://codiusmonitor.com/panel/client . The upload test itself runs for maximum 60 seconds, however if your client is not updated it will keep showing "loading" because the old client can't interpret "upload test" command.

I did have the newest release but it seems another issue was going on at the same time.  I have been up and running successfully for weeks and all of a sudden a few days ago I started hosting multiple contracts that never ended.  Now I think that they may have been stuck.  After rebooting and restarting all the services the pod test works.  Thanks

Share this post


Link to post
Share on other sites

Hey people, just want to share an update.

Quite a lot of work have been done in a past few weeks. Everything is stable now, a lot of functionality added & significant UI refactoring.

https://codiusmonitor.com/panel/news

new:

  • Codius variables editor
  • Fail2Ban installer & manage
  • Netstat command support
  • Stats from codiusd API
  • UI review & stability improvements
  • Selection_005.png.7e06efd94de2edf52144fbbdaf056768.png
  • Selection_006.thumb.png.b8a48181c79463aae6462833cbbeab9d.pngSelection_007.png.4175809a776e074178bda7234b6da8e6.png
Edited by opahopa

Share this post


Link to post
Share on other sites

×