Access Waddle SDK to perform all CREATE, READ, DELETE and UPDATE bucket , metrics , alert .
To use this module first simply install the module using the below command.
npm i waddle-node-sdk
The current version of the module has only 21 functions to use
getToken method is used to get the token of waddle.
createBucket method is used to create a bucket.
To create Bucket need to pass, user_id : string, interval : number, location : string, name :string, retention_days : number, type : string
getBuckets method is used to fetch all the buckets.
archieveBucket method is used to archeive a particular bucket.
To archeive a bucket need to pass bucketId and data's like is_archived : boolean, user_id : string
updateBucket method is used to update the bucket name of particular bucket.
To update a bucket name need to pass bucketId , metricId and data's like name : string, user_id : string
createMetric method is used to create a metric.
To create Bucked need to pass bucketId and metricId and data's like , user_id : string , name : string
getMetric method is used to fetch the metric details.
To fetch the metric details need to pass bucketId and metricId.
deleteMetric method is used to delete the metric that is in a bucket.
To delete the metric need to pass bucketId and metricId.
updateMetric method is used to update the metric tag.
note:can`t able to update metric name
To update metric name need to pass bucketId and metricId and data's like. user_id : string tag : string
getAnomaly method is used to fetch the details of anomaly.
getFilteredAnomaly method is used to fetch and filter the deatils of anomaly.
createAlert method is used to create an Alert.
To create alert need to pass bucketId and metricId and data's like, comparison : string lower_range : number metric_id : string name : string services : Array of strings type : string upper_range : number
getBucketAlert method is used to fetch all the buckets.
To fetch the alert of a bucket we need to pass bucketId.
getMetricAlert method is used to fetch all the buckets.
To fetch the alert of a bucket we need to pass bucketId and metricId.
deleteAlert method is used to delete a particular Alert.
To delete a bucket need to pass bucketId and metricId.
updateAlert method is used to update the alert.
To update a bucket name need to pass bucketId and data's like, comparison : string lower_range : number metric_id : string name : string services : Array of strings type : string upper_range : number
getEventCorrelation method to fetch correlated data .
getBucketTelemetry method is used to fetch telemetric data of buckets.
getMetricTelemetry method is used to fetch telemetric data of metrics.
batchload method is used to create a bulk amount of metrics and add data to those metrics
To create batchload we need to pass bucketId and data's like
batch : array of strings and values
tag : string
timestamp : datetime format ex:timestamp": "2023-01-25T20:23:06+05:30
Example:
{
"batch":
{
"metrics2": 518.67,
"metrics2": 1.3,
"metrics3": 47.47
},
"tag":"demo",
"timestamp": "2021-01-13T20:23:06+05:30"
}
addData method is used to add data to the metrics
To add data we need to pass bucketId , metricId and data's like
timestamp : datetime ; format ex : timestamp": "2023-01-25T20:23:06+05:30
value : number