Git Product home page Git Product logo

meteor-server-info's Introduction

percolate:server-info

Description

Meteor package for querying a meteor app for diagnostics information.

The package sets up a route (By default at /info) that returns a json object containing useful debugging about your running Meteor app.

This is really useful for querying your application state from an external source, such as shell scripts that may forward the data to cloudwatch or other logs.

Example output

{
    "extras": {
      "commit": "fb5954a395612c260d78d4a44df7bee12131c5ef"
    },
    "counts": {
        "nCollectionsWithLRSes": {
            "foos": 1,
            "bars": 1,
            "meteor_accounts_loginServiceConfiguration": 1,
            "notifications": 1,
            "users": 3
        },
        "nDocuments": {
            "foos": 1,
            "bars": 3,
            "meteor_accounts_loginServiceConfiguration": 1,
            "users": 1
        },
        "nLiveResultsSets": 7,
        "nObserveHandles": 7,
        "nSessions": null,
        "nSockets": 1,
        "nSocketsWithLivedataSessions": 0,
        "nSubs": {
            "base": 1,
            "meteor.loginServiceConfiguration": 1
        }
    },
    "ec2": {
        "ami-id": "XXX",
        "ami-launch-index": "0",
        "ami-manifest-path": "(unknown)",
        "ancestor-ami-ids": "unavailable",
        "availability-zone": "us-west-1a",
        "block-device-mapping": "ami",
        "instance-action": "none",
        "instance-id": "XXX",
        "instance-type": "m1.medium",
        "kernel-id": "XXX",
        "local-hostname": "XXX",
        "local-ipv4": "XXX",
        "mac": "unavailable",
        "product-codes": "unavailable",
        "profile": "default-paravirtual",
        "public-hostname": "XXX",
        "public-ipv4": "XXX",
        "ramdisk-id": "unavailable",
        "reserveration-id": "unavailable",
        "security-groups": "web",
        "user-data": "unavailable"
    }
}

Installation

Meteor ServerInfo can be installed with Meteorite. From inside a Meteorite-managed app:

$ meteor add percolate:server-info

Usage

Install the package, then access /info on your running application. By default, the route is protected by a username/password combinbation of insecure:secureme that you should promptly change.

From the command line, you could run curl http://insecure:secureme@localhost:3000/info.

Configuration

You can set the path and http basic authentication credentials like

ServerInfo.settings = {
  path: '/info',
  user: 'insecure',
  password: 'secureme',
  extras: undefined //a function or any other data to add
};

extras is an optional field that will be returned as part of the json object. If you provide a function, it will be evaluated and it's return value will be added to the json object.

License

MIT. (c) Percolate Studio, maintained by Zoltan Olah (@zol).

meteor-server-info's People

Contributors

nnevala avatar sevki avatar tmeasday avatar zol avatar

Watchers

 avatar

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.