Howdy, Stranger!

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

Advertise on LowEndTalk.com
NIXStats API release + usage examples
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

NIXStats API release + usage examples

vfusevfuse Member, Provider

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.

NIXStats monitoring Web, Server(Linux, Windows - $9.95/m), Logging (Free!) and Blacklists (start at 512 for $3.75/m) - Uptime Report - API Docs

Comments

  • Thanks! I will try the API tomorrow.

    Thanked by 1vfuse

    vrtz.net Cheap VPS Servers Offers - now with EXCLUSIVE offers! (all links are aff links)
    $12/year HostUS Deal (768MB RAM+768MB vSwap)$11.29/year GestionDBI Deal (768MB RAM)

  • 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 Member, Provider
  • 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

    Make your choice on your own But i can help you to make them right.

  • 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, Provider

    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

    NIXStats monitoring Web, Server(Linux, Windows - $9.95/m), Logging (Free!) and Blacklists (start at 512 for $3.75/m) - Uptime Report - API Docs

  • 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, Provider

    @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.

    NIXStats monitoring Web, Server(Linux, Windows - $9.95/m), Logging (Free!) and Blacklists (start at 512 for $3.75/m) - Uptime Report - API Docs

  • 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

    I ❤ Laravel

  • @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, Provider

    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).

    NIXStats monitoring Web, Server(Linux, Windows - $9.95/m), Logging (Free!) and Blacklists (start at 512 for $3.75/m) - Uptime Report - API Docs

  • 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
    * Centmin Mod Project (HTTP/2 support + ngx_pagespeed + Nginx Lua + Vhost Stats)
    * Centmin Mod LEMP Stack Quick Install Guide
  • vfusevfuse Member, Provider

    @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

    NIXStats monitoring Web, Server(Linux, Windows - $9.95/m), Logging (Free!) and Blacklists (start at 512 for $3.75/m) - Uptime Report - API Docs

  • @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, Provider

    @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.

    NIXStats monitoring Web, Server(Linux, Windows - $9.95/m), Logging (Free!) and Blacklists (start at 512 for $3.75/m) - Uptime Report - API Docs

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

    Thanked by 2colingpt ATHK

    This signature wasted 121 bytes of your data allocation.

    https://nixstats.com/report/56b53d6465689e44598b4567

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

    +1, although great work worth money :)

  • @vfuse 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.

    Just need to have a notification on low credits and/or an auto top-up method.

  • gleertgleert Member, Provider
    edited January 2016

    @vfuse

    On pricing, I would go with a simple 1$/month/server. And a special tier for the LET beta testers off course...

    Will you be adding multiple users / notify multiple users

  • xaitmixaitmi Member
    edited June 2016

    @vfuse would be cool if nixstats can show bandwidth utilization for each server so i can see that I've used 780GB out of 1TB etc.

    I just added ~ 20 servers to my account.

    Thanked by 1Foul
  • FoulFoul Member

    xaitmi said: @vfuse would be cool if nixstats can show bandwidth utilization for each server so i can see that I've used 780GB out of 1TB etc.

    I just added ~ 20 servers to my account.

    Nice necro! You get 10 stars from me.

  • vfusevfuse Member, Provider

    @xaitmi said:
    @vfuse would be cool if nixstats can show bandwidth utilization for each server so i can see that I've used 780GB out of 1TB etc.

    I just added ~ 20 servers to my account.

    I'll see if I can add something like that, it would always be an "estimate" tho since I would have to calculate it by getting the average speed and multiplying it by the time passed.

    The API is currently (partly) under construction. The dashboard is being update more this week with a better overview page so you'll see the total averages of all your servers and more stuff. Last week I added a live updates on the server overview page, updated every minute.

    NIXStats monitoring Web, Server(Linux, Windows - $9.95/m), Logging (Free!) and Blacklists (start at 512 for $3.75/m) - Uptime Report - API Docs

  • ovilizoviliz Member
    edited October 2016

    To me, $1/mo/server is way too much. What about the domains then?

    Often we can't just rely on one single uptime/monitoring service so you'll have to use/pay for two separate services. One service alert confirms (or not) the other.
    I like to have control on all servers, doesn't matter their cost. A €2.99/mo Scaleway server it needs to be managed, backed up, secured and monitored. Same with a $40/mo Linode plan or a dedicated server.

    Again, to me, a reasonable price is on the model of StatusCake. They recently introduced server monitoring too, within the £15/m/+VAT plan (1 year upfront), without monitor constraints.
    I like DataDog too, but I can't use it. As a SysAdmin, I hate to privilege individual servers and dealing with multiple partial dashboards of my servers. "Everything" in one (max 2) GUI/DB or nothing. Maybe is just me...

    0% interests | cristianbalan.it

Sign In or Register to comment.