Comments (8)
Hi! To connect to ElasticSearch, specify ES URL in options when initializing swagger-stats:
var swsOptions = {
name: 'swagger-stats-spectest',
version: '0.95.0',
hostname: "hostname",
ip: "127.0.0.1",
swaggerSpec:swaggerSpec,
uriPath: '/swagger-stats',
durationBuckets: [10, 25, 50, 100, 200],
requestSizeBuckets: [10, 25, 50, 100, 200],
responseSizeBuckets: [10, 25, 50, 100, 200],
apdexThreshold: 25,
elasticsearch = 'http://localhost:9200'
};
app.use(swStats.getMiddleware(swsOptions));
The schema (index template) of the documents written to ElasticSearch by swagger-stats is available in /schema/elasticsearch/api_index_template.json
Will be adding more docs ...
from swagger-stats.
i use
var swStats = require('swagger-stats');
// var apiSpec = require('swagger.json');
webApp.use(swStats.getMiddleware({
elasticsearch: "http://xx.xx.xx.xx:9200"
}));
but the' http://xx.xx.xx.xx:30001/swagger-stats/ui#sws_rates'
when i restart app server the data is disappear
How to persist data๏ผ
from swagger-stats.
Hi ! The data in built-in telemetry dashboard is not persisted across restarts. Swagger-stats shows built-in dashboard based on in-memory data only. This is to ensure that built-in telemetry does not depend on any external server.
Now, if you have ElasticSearch enabled, swagger-stats wrintes info about each API requests to ElasticSearch. This data is persistent. You can use Kibana to analyze data written into ElasticSearch. You may load provided Kibana dashboard, or create your own, and of course use Discover in Kibana.
from swagger-stats.
@sv2 thk u for woking all very much
from swagger-stats.
How come memory and cpu stats are not sent to ES? Would be really nice instead of only Prometheus.
Thanks.
from swagger-stats.
Makes sense, will do. Thanks !
from swagger-stats.
#85 - for tracking
from swagger-stats.
@sv2 "You may load provided Kibana dashboard,"
Could you explain how to load the provided Kibana dashboard please ?
from swagger-stats.
Related Issues (20)
- set uri path different api crawl HOT 2
- Error too many open files, uv_resident_set_memory
- How to add `swagger-stats` routes on swagger description
- api_index_template.json is missing in the last patch HOT 3
- Is it related to the latest version? HOT 3
- unit tests fail at [email protected] HOT 4
- How to make the data persist? HOT 1
- URL Normalization and 404 count consolidation by config option without requiring swagger apiSpec HOT 1
- how to customize metrics
- problem
- feat
- Hope to support a new feature
- DEBUG env is being overridden by `lib/swsElasticEmitter.js`
- 0.99.7 HOT 1
- where is the file "swagger.json" ? HOT 1
- Error on routes with wildcards
- Support prom-client 15
- Issue with Basic Auth when connecting the Endpoint to Grafana cloud HOT 2
- ReferenceError: that is not defined
- How to implement it in a production environment? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swagger-stats.