Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


NIXStats API release + usage examples
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

NIXStats API release + usage examples

vfusevfuse Member, Host Rep

I'm posting some examples for the API since about 350 people from LET signed up for the NIXStats beta.

Anyone can read the api documentation at https://nixstats.com/api/documentation.html this covers the API endpoints as well as an example for the return data.

You can create an API key at the settings page under the api tab.

All data from the API is returned in JSON format. Successful calls will return a http 200, invalid calls will return something else. The API is limited to 1000 requests per hour, the amount of requests remaining/used is returned in the HTTP header as shown in the documentation.

I tried to post these examples on LET directly but cloudflare wouldn't let me so here are some links of basic examples:

Get a list of all domains: https://nixstats.com/api/domains.example.php.txt
Get a single domain: https://nixstats.com/api/domain.example.php.txt

Get a list of all servers: https://nixstats.com/api/servers.example.php.txt
Get a servers cpu usage from last hour: https://nixstats.com/api/server.example.php.txt

I'll try to post some more examples soon.

«1

Comments

  • Thanks! I will try the API tomorrow.

    Thanked by 1vfuse
  • sinsin Member

    Hey @vfuse , just wanted to let you know that Nix Stats truly is awesome and I know the community here is happy that you continue to work on it :)

  • MikePTMikePT Moderator, Patron Provider, Veteran

    It's indeed an amazing service! I truly love it! :)

    Thanked by 2vfuse ATHK
  • Yes! Very much love and appreciate your work on NIXStats!

  • @vfuse Great work with nixstats its the great service I'm exited to see the finished product

  • Niceone! can't wait to tinker around with this ;D

  • Just got started with it and its amazing so far.
    I'd like to try the python client though to check out the nginx and mysql plugins, is there any risk involved except it not working?

  • Ovidiu said: it not working

    That's basically the worst I ever had, and it's simple to revert.

  • vfusevfuse Member, Host Rep

    Thanks everyone :)

    Here's an example that gets all the servers in your account and plots their location on google maps.

    http://nixstats.com/api/googlemaps.php.txt

    @Ovidiu said:
    Just got started with it and its amazing so far.
    I'd like to try the python client though to check out the nginx and mysql plugins, is there any risk involved except it not working?

    The python agent should be stable, there's not much that can go wrong, you do need python 2.7 on your server.

    Thanked by 2Dustlab eva2000
  • OK, I gave it a try, saw errors flashing by, too fast to read, reported it via your integrated feedback system. Need help to find the log and debug what went wrong. Reported a few other issues in the same place.
    Btw. it looks like the agent downloads about 400MB or did I misread that?

  • vfusevfuse Member, Host Rep

    @Ovidiu said:
    OK, I gave it a try, saw errors flashing by, too fast to read, reported it via your integrated feedback system. Need help to find the log and debug what went wrong. Reported a few other issues in the same place.
    Btw. it looks like the agent downloads about 400MB or did I misread that?

    The agent has some dependencies like python2.7 and some python plugins which are install via pip.

  • Using Python 2.7.3 - shouldn't it install its own dependencies? Where do I find the install log?

  • Wish i could have an invitation key...

    Thanked by 1vfuse
  • @PremiumN said:
    Wish i could have an invitation key...

    just use BETA or LET

    Thanked by 1vfuse
  • just set up with 2 domains and 3 servers.
    love the interface, looks very clean and professional.
    will try api soon.

  • @vfuse:

    still struggling with installing the python client on one of my servers. Trying to figure it out. When the install starts I see these lines:

    Connecting to api.nixstats.com (api.nixstats.com)|149.202.189.230|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 4879 (4.8K) [application/octet-stream]
    Saving to: `install_python.sh'

    100%[================================================================================================================>] 4,879 --.-K/s in 0s

    2016-01-17 09:32:43 (25.6 MB/s) - `install_python.sh' saved [4879/4879]

    E: Unable to correct problems, you have held broken packages.
    --2016-01-17 09:32:48-- https://bootstrap.pypa.io/get-pip.py
    Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 23.235.46.175

    Yet I have no held or broken packages as confirmed with:
    apt-get clean && apt-get update
    dpkg --configure -a
    apt-get upgrade
    apt-get install -f
    dpkg --get-selections | grep hold

    None of thee commands return anything useful or any hints of anything broken or held.

    Thanked by 1vfuse
  • Installed experimental version, got this on both servers Ubuntu 15.10 x64

    insserv: warning: script 'nixstats' missing LSB tags and overrides
    

    But it's working, I can see them in dashboard. Looking really nice :)

    Thanked by 1vfuse
  • I haven't had a good time with the Python version, but I've been on CentOS 6 only really, and don't want to modify the cPanel Python version.

    Love the service and hoping you'll offer a one-time lifetime fee for LET / beta users if it goes paid @vfuse !

    Constellix is about to go paid, and looking to go all in with Nixstats instead. Just worried about the pricing estimates in the long run, as I install it on every server of mine...

    Often just to keep track of them.

    tl;dr - thanks & thanks again

    Thanked by 2vfuse Ovidiu
  • vfusevfuse Member, Host Rep

    Thanks for the feedback everyone!

    I've just added another API endpoint to fetch uptime of a server for a specific time period. https://nixstats.com/api/documentation.html#servers-servers-uptime

    @Kris I'll announce more on pricing as soon as the new dashboard is up. There will be discount for beta users and also a free package. It will be a subscription based payment. It's hard to keep up quality with a one-time payment service (cloudatcost). Keeping up infrastructure is pricy as well. Feel free to give feedback on pricing or what you think is reasonable (either here or by pm).

  • vfuse said: @Kris I'll announce more on pricing as soon as the new dashboard is up. There will be discount for beta users and also a free package. It will be a subscription based payment. It's hard to keep up quality with a one-time payment service (cloudatcost). Keeping up infrastructure is pricy as well. Feel free to give feedback on pricing or what you think is reasonable (either here or by pm).

    Wasn't thinking cheap one time cost, more almost an investment in going public, upwards of $150 & assisting in beta to to polish things.

    Perhaps the 3 tier model?

    Starting at 3.99/month, 7.99/month, and finally 14.99/month, including the full monty for web hosts including CNAME's, etc.

    Here's a pretty good article summarizing tiered pricing and methods of adding value.

    Funny enough, CloudAtCost model can be done quite alright assuming you don't have ridiculous sales of 70-90% off randomly. TheForeverCloud is by TerraHost, and damn stable.

    Thanked by 1vfuse
  • colingptcolingpt Member
    edited January 2016

    @vfuse said:

    hi, your blog site looks down now. I tried to find a guide, and after a bit search, I found this:

    www.nixstats.ovh/nixstats-python-agent/

    but it shows error 503, only could be accessed through google cache.

    Also, python process took 41mb RAM out of my 490mb, is it normal?

    thanks for your work!

    Thanked by 1vfuse
  • edited January 2016

    I've seen a kimsufi not having bandwidth being displayed
    Shell installer.
    Product is a gem

    Thanked by 1vfuse
  • @vfuse why not add an online site API generator ? folks can then pick some feature they like and hit a button to generate a sample API code/html etc they can use :)

    Thanked by 2vfuse angrysnarl
  • vfusevfuse Member, Host Rep

    @colingpt said:
    thanks for your work!

    Looks like OVH took down the runabove hosted blog. I'll try to setup a new blog later this month.

    @eva2000 said:
    vfuse why not add an online site API generator ? folks can then pick some feature they like and hit a button to generate a sample API code/html etc they can use :)

    Sounds like a good idea but a bit out of scope for now, have to focus on core features first.

    @Kris said:

    Packaged pricing is a good idea and keeps things simple but I want to prevent users from signing up for example for a $10 per month 5 servers package if they only have 3 servers (why pay for 5 right?). Alternative would be pay per server or per hour, this would be most fair but makes things more complicated and harder for a user to see their costs.

    Just got an e-mail from OVH that they accepted NIXStats for their Digital Launch Pad Program! I don't know how much use it will be yet but at least will save me some costs on servers.

    Thanked by 4Kris colingpt jaden cassa
  • @vfuse said:

    Pricing similar to https://updown.io/ works quite well - it costs credits which you top up and you get charged by the time that you are monitoring.

  • @vfuse said:
    Just got an e-mail from OVH that they accepted NIXStats for their Digital Launch Pad Program! I don't know how much use it will be yet but at least will save me some costs on servers.

    Congratulations! I hope the cost savings are significant.

  • @vfuse said:

    hi, just found that, nixstat doesn't seed any message to me when my servers reboot or even after poweroff, I did turn on the reboot notification tick.

    after the server reboot, it still shows 100% uptime. I am using python version...

  • vfusevfuse Member, Host Rep

    @colingpt said:
    after the server reboot, it still shows 100% uptime. I am using python version...

    Yesterday there was a problem with one of the check servers (crond crashed) this should be solved now, started monitoring crond to prevent this.

    @jaden said:
    Congratulations! I hope the cost savings are significant.

    I hope so too thanks! :)

    @iKeyZ said:

    The issue with credits is if you forget to top up you'll run out and won't get notifications anymore, to keep it simple it might be better to have a subscription model.

  • Hopefully the small amount of users from LET will have a free tier :)

    Thanked by 2colingpt ATHK
  • @0xdragon said:
    Hopefully the small amount of users from LET will have a free tier :)

    +1, although great work worth money :)

Sign In or Register to comment.