Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service to send alerts when unconfirmed txns do not empty #96

Open
gz-c opened this issue May 26, 2018 · 3 comments
Open

Service to send alerts when unconfirmed txns do not empty #96

gz-c opened this issue May 26, 2018 · 3 comments

Comments

@gz-c
Copy link
Member

gz-c commented May 26, 2018

Using this endpoint: https://explorer.skycoin.net/api/pendingTxs

If an unconfirmed txn is in the array for more than 1 minute, send an alert

This service can be run in a cron job

The API response is documented here:
https://github.com/skycoin/skycoin/blob/develop/src/api/README.md#get-unconfirmed-transactions
The txid field can be used to identify the transaction.

@nutmix
Copy link
Contributor

nutmix commented May 29, 2018

Suggest the following config parameters:

  1. smtp server:port
  2. smtp username
  3. smtp password
  4. smtp from address
  5. unconfirmed duration (default 60) in seconds.

Params ideally can be set via command line, config file or env.

Suggest system logs to stdout AND sends an email when it gets an error including:

  1. Error calling the API or parsing the results.
  2. Unconfirmed trans > 1 min (i.e. when it sends alert sms)
  3. SMTP errors (no email can be sent in this case, just write to log)
  4. any exceptions etc.

Write a quick readme.md with how to use/configure

Does the email/log need to contain the json returned by the API in case of delayed transaction?

@gz-c
Copy link
Member Author

gz-c commented May 29, 2018

Email should include it, but if for some reason its excessively large it can be truncated to some max size.

The log can say how many unconfirmed txns, the timestamp of the oldest and timestamp of the newest, using a human readable timestamp. Email should include this information too

@nutmix
Copy link
Contributor

nutmix commented May 29, 2018

Alexey has written the code, he is just tweaking it and he will check it in to master branch (no develop branch)

nutmix added a commit that referenced this issue May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants