0.3.3 • Published 7 years ago

@aftonbladet/argos v0.3.3

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
7 years ago

argos - Node process and @aftonbladet/loading-cache monitoring

About the name

Argus Panoptes or Argos was a hundred-eyed giant in Greek mythology. He was a giant, the son of Arestor, whose name "Panoptes" meant "the all-seeing one". His main task was to guard Io.

Source

Usage

Configure some environment variables:

VARIABLEDescriptionMandatoryDefaultExample
ARGOS_ENABLEDSet to true or yes to enable argosYestrue
ARGOS_JOB_NAMEThe prometheus job nameYesiris-stage
ARGOS_INSTANCEThe prometheus instance nameNo$BOXFUSE_INSTANCE_ID or localworker-0
ARGOS_GATEWAY_URLThe prometheus push gateway URLNohttp://prometheus-pushgateway.local.net:9091http://prometheus-pushgateway-prod.aftonbladet.io:9091
ARGOS_METRIC_PREFIXA prefix that is added to all created metric namesNo''iris_
ARGOS_METRIC_HELP_PREFIXA prefix that is added to all help textsNoMetrics forIris metrics for
ARGOS_PUSH_INTERVALHow often in milliseconds to push to the prometheus gatewayNo100003000
ARGOS_PERFORM_CLEANUPIf all metrics matching the job name are to be deleted from the push gateway on startup. This also tries to remove the added metrics on shutdown.Notruefalse

Add the following as early as possible in your code:

require('@aftonbladet/argos');

Monitor an @aftonbladet/loading-cache

Use the monitored eviction strategy and remember to specify a name:

import LoadingCache from '@aftonbladet/loading-cache';
import { MonitoredLruEvictionStrategy } from '@aftonbladet/argos';

const cache = new LoadingCache({
    evictionStrategy: new MonitoredLruEvictionStrategy({
        maxEntries: articleApiCacheMaxEntries,
        maxAge: articleApiCacheTtl,
        name: 'article_api_cache',
    }),
});

Publish

npm version <major|minor|patch>
0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago