npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

notify-used-or-free

v0.0.4

Published

Notify by email of free disk space on server or when a certain amount of disk space has been used.

Downloads

9

Readme

notify-used-or-free

Travis

Install

$ npm install -g notify-used-or-free

Notify by email or sms of free disk space on server or when a certain amount of disk space has been used.

Suggestion: Install and run notify-used-or-free on your server using a daily cron job that runs around lunch time, so you can fix any issues after lunch.

How to use

show help

Usage: notify-used-or-free <disk> <options>

notify-used-or-free / -a 5GB -R [email protected] -u username -p password -S sendgrid


Options:

-V, --version                                                                                                          output the version number
-i, --info                                                                                                             print data info
-r, --round                                                                                                            return integer instead of floating point number eg. 1GB not 1.23GB
-d, --detect [<used>|<free>]                                                                                           used or free space, free by default
-m, --modifier [<less>|<more>]                                                                                         less or more than detected amount, less by default
-a, --amount <10GB>                                                                                                    amount of space used or free on disk, eg. 1024MB, 1TB; 5GB by default
-t, --template <{{name}} detected {{disk}} has {{out}} {{detect}} on {{hostname}}, which is {{modifier}} than {{in}}>  
-s, --subject <[LOW|HIGH] DISK SPACE>                                                                                  send email with this subject title
-R, --recipients [[email protected], [email protected]]                                                                       email addresses to send message to
-e, --sender-email <[email protected]>                                                                                   sender email address
-n, --sender-name <NotifyUsedOrFree>                                                                                   sender name
-S, --service <Mailgun|Mailjet|Postmark|SendGrid|SES|SES-US-EAST-1|SES-US-WEST-2|SES-EU-WEST-1|Sparkpost>              service to use, instead of using host:port
-H, --host <host.server>                                                                                               host of mail server, or provide service instead
-P, --port <587>                                                                                                       port of mail server, or provide service instead
-c, --secure                                                                                                           secure connection to send email, true by default
-u, --user <name>                                                                                                      username on mail server
-p, --pass <word>                                                                                                      password on mail server for username
-L, --log <logDir>                                                                                                     save to logfile in <logDir>/.notify-used-or-free.log
-X, --debug                                                                                                            show debug messages, false by default
-j, --json                                                                                                             json log output, false by default
-q, --quite                                                                                                            suppress logger output, false by default
-A, --account-sid <ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>                                                                 valid Twilio account sid
-T, --auth-token <your_auth_token>                                                                                     valid Twilio auth token
-O, --phones [+13105551234, +12065551234]                                                                              phone numbers to send message to
-o, --sender-phone <+13105551234>                                                                                      valid Twilio phone number
-h, --help                                                                                                             output usage information

run command

using sendgrid --service, no --host and --port params required

$ notify-used-or-free / -a 10GB -R [email protected] -S sendgrid -u username -p password

using --host and --port, instead of a --service

$ notify-used-or-free / -a 10GB -R [email protected] -H smtp.mail.server -P 587 -u username -p password

Development

$ cd notify-used-or-free/
$ npm i -g
$ npm link

Testing

$ npm test

License

MIT © Alex Goretoy