Code Monkey home page Code Monkey logo

monitor's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monitor's Issues

encode URLs when calling a service inside another middleware

usecase that i just encountered.

A middleware in service A, is calling service B.
using http.get(url)

But in my url variable I had some parameters with whitespace so it looked like
https://fd1ce27f-d10f592b97db.my.apitools.com/estimates/price?start_point=carre rocafort 80&end_point=carrer napols 180&channel=pandas

and gives me back a 400.

but if I converts " " to %20 it works.

My point: have something that does this conversation automatically. or acceptswhitespaces
Or have better error message.

Thanks

Export/import services and pipelines

Related with #39

It would be useful to have one endpoint to export/import a service's configuration (endpoint, pipeline) so that it can be then imported in a different monitor.

Make crontab more resilient

I don't know how feasible this is, but it seems that it's possible that the worker in charge of the crontab sometimes dies and doesn't wake up. We must investigate if this is a real issue, and devise a way to either make it less possible to fail (i.e. move all tasks to other workers, and leave the crontab worker as a "queue manager" only) and fault tolerant (for example, "check and wake" the crontab process when a new request is received, and 5 minutes have passed since the last check and wake).

http.post.json not execute unless i put console.log(var)

Weird behavior I've just seen...

this won't do the post
local r = http.json.post(hookURL,'{"text": "'..msg..'","channel":"#'.. decoded_params.channel_name..'","icon_emoji":":cat:"}')

but this will do

local r = http.json.post(hookURL,'{"text": "'..msg..'","channel":"#'.. decoded_params.channel_name..'","icon_emoji":":cat:"}')

console.log(r)

on this middleware https://fdf2cfc6fadb.my.apitools.com/app/services/1/middlewares/bfadd6dd-6c82-446f-83ac-0e94ed4302a3

No idea why.

Opening tabs make it switch Service

I thought it was my fault but apparently not... I guess it's part of the angular app. but it's a very annoying bug when you are working with different services.

when you are on a service and you "command-click" (to open a new tab) on the name of another service, to open it's traces on a different tab. The first tab switch to this service.

I guess that's also what is causing trouble saving middleware, when you have multiple tabs open.

Contribute fig.yml to launch APITools and Redis

Below is a small fig.yml that I use to launch APITools and Redis.
Hope it can help others get started more quickly(assuming they already have fig installed).

apitools:
  image: quay.io/3scale/apitools
  ports:
    - "7071:7071"
    - "10002:10002"
  links:
    - redis:db

redis:
  image: redis

Smtp

I find the handling of mail a bit weird. We use Mandrill, not Sendgrid. But why would you need to integrate every provider and not just use SMTP credentials?

Then you would support any provider...

Read middlewares from apitools/middleware

The middleware specs are hard-coded in the monitor. We should put some kind of mechanism in place to read from the apitools/middleware github repo instead / in addition to that.

Handle gzip content...

How should we go about handling Gzip'd content we're receiving upstream from our API service provider?

Right now, in the trace, we're seeing '(binary)' for the content. We'd like to gunzip this and add to the trace.

Thanks!

Lua console does not support emoji

Something funny that I just found... Emojis are not displayed in middleware console. They are considered as whitespaces.

Not P1... I am just reporting :)

apitools_traffic_monitor

caps in headers are not respected

today I was trying to add in a middleware the headers API-KEY and API-SECRET to my request but they got transformed into Api-Key and Api-Secret which was not recognized by the API...

apitools_traffic_monitor

Wikipedia "example urls" have stopped working

It seems that there is some redirection now, which makes the thing fail.

Steps to reproduce:

  • Create a new service using Wikipedia
  • Try the "base url" with the navigator (you will get a "too many redirections" error)
  • If you try it with curl you will get a 301 redirect instead of the results of the query

Add warning when deleting default middleware

Today I faced some issues after deleting the default middleware and adding my own.

It looks like I could do use compressed JSON anymore...

@kikito found this.

It would be great to add a warning either:

  • when you delete the default middleware
  • when you use json.decode and you get the typical error

Memory leaking...

I seem to have developed a pretty severe memory leak in the nginx worker process after months of very smooth operation. I have not made any changes to the APItools configuration or pipelines in months.

I've rebooted and still seem to be plagued by 80-100% CPU usage and what appears to be a memory leak. It's growing at about 1MB of usage every two seconds.

screen shot 2015-03-07 at 12 00 05 pm

I'm not really sure how to diagnose the issue and, hopefully, this is something you openresty/nginx gurus can help with. I'm running the latest APItools via Debian package install. There are very few requests to this instance, which is what is boggling my mind. Also, it's weird that it just cropped up out of nowhere.

In any case, please let me know what's needed for debugging, as there aren't many articles out there for tracking down memory leaks in nginx -- especially ones that seemingly came out of nowhere and for no reason whatsoever.

Thanks!

How to trigger `system.cron_trigger()` or `system.cron_flush()` automatically on APItools UI.

I've just installed the APItools monitor in my server according to On-Premise APItools Monitor. After adding a service, I can't see any traces on the "Traces" tab when I access my local APIs.

After diving into the source code of monitor, I found that traces are saved here:

# lua/models/pipeline.lua
Trace:async_save(trace, ...)

Trace:async_save() enqueue the trace object which will be actually saved later by Model:consume(). And then, Model:consume() is called by system.cron_trigger() or system.cron_flush().

Finally, I found the route mapping here:

# lua/apps/api.lua
router:post(   '/api/system/cron/flush'                      , r('system.cron_flush'))
router:post(   '/api/system/cron'                            , r('system.cron_trigger')) -- async

I said god bless me when I am trying to POST to "/api/system/cron" manually, it did work! When I access my APIs, traces are generated and shown in list. Thank godness!

But my quessions here are:

  1. How to trigger the POST action on APItools UI?
  2. How to save traces automatically without extra manual work?

Docker image wont start

Trying to run fig, but docker pull fails on mikz/grafana:latest because it doesn't exist anymore.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.