# hubot-service-info

> Service Info Hubot Script

Latest version **1.0.0** (published 2015-05-11) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install hubot-service-info
pnpm add hubot-service-info
yarn add hubot-service-info
bun add hubot-service-info
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-05-11 |
| First published | 2015-05-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | David Stockton |
| Maintainers | dstockton |
| Keywords | hubot, service-info |

## Links

- npm: https://www.npmjs.com/package/hubot-service-info
- Repository: https://github.com/MSMFG/hubot-service-info
- Issues: https://github.com/MSMFG/hubot-service-info/issues
- npm.io page: https://npm.io/package/hubot-service-info

## Dependencies (1)

- [coffee-script](https://npm.io/package/coffee-script.md) *

## Recent versions

- 1.0.0 (latest) — 2015-05-11

## README

# hubot-service-info

Allows Hubot to query service info based on DNS records behind an IP address

See [`src/services.coffee`](src/services.coffee) for full documentation.

## Installation

In hubot project repo, run:

`npm install hubot-service-info --save`

Then add **hubot-service-info** to your `external-scripts.json`:

```json
[
  "hubot-service-info"
]
```

Optionally, add the following environment variable to your execution environment:

```
HUBOT_SERVICE_INFO_CONFIG_PASSWORD=<password goes here>
```

## Commands

- ```service info config set <password> <url or JSON>``` - initialize service info with some configuration. Either from a URL, or directly with a JSON object (see below for configuration documenation).
- ```service info config show <password>``` - Display the current configuration as a JSON object.
- ```service info show <environment> [<organisation>]``` - Show service information for the given environment (and organisation) combination.

## Configuration format

```json
{
  "config": {
    "password": "<your password here>",
    "default_organisation": "org1"
  },
  "services": {
    "common": [
      {"First Service":
        {
          "hostname": "my.${ENV}.host.${ORG}.name",
          "port": 80,
          "endpoint": "/version",
          "jpath": "status/version"
        }
      }
    ],
    "specifics": {
      "org1": [
        {"org1 only Service":
          {
            "hostname": "my.${ENV}.host.${ORG}.name",
            "port": 81,
            "endpoint": "/admin/version",
            "jpath": "status/version_string/_SPLIT_LAST_SPACE_"
          }
        }
      ]
    }
  }
}
```

## Sample Interaction

```
user> hubot service info config set password http://url/to/config.json
hubot> Service info configuration loaded OK.
user> hubot service info show production
hubot> Results for production are in...
    First Service has 2 servers running '1.0.0'
    First Service has 2 servers running '1.0.1'
    org1 only Service has 3 servers running '2.3.4'
```

---
_Source: https://npm.io/package/hubot-service-info · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
