Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Check Internet Quota Usage (BSNL)
0.1
2010-11-30
- Nagios 3.x
Other
122184
File | Description |
---|---|
check_bsnl | usageFormats the output from bsnl.sh to nagios format |
bsnl.sh | Retrives your current usage |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Uses curl and is written for BSNL's web site. You'll need to modify bsnl.sh for you're ISP.
These scripts should work on any version of nagios, but only tested on nagios 3.x.
These scripts could be merged together, if anyone wanted to spend the time. However, having them as two scripts makes it easier to replace the bsnl.sh script with something which works for your provider.
The bsnl.sh script will download your usage information from BSNL, an ISP in India, and will output the number to a fixed file for check_bsnl to read. It will calculate your usage in %, depending on the day of the month. Schedule it with cron or call it from the perl script.
I use a cron job as I used to have it email me the numbers on a daily basis. Then I got clever and implemented Nagios, which will email me only when required.
Usage:
Example, if your monthly cap is 50GB and you've used 30GB on day 15. Its status will be critical as you're on target to use 60GB by the end of the month.
If usage on the 15th day is 10GB, status will be "OK", as you're usage looks like it will be 20GB of your 50GB quota by the end of the month.
Sample output on day 30:
check_bsnl: OK (Usage is 30.0 GB of 50.0 GB, (60.0%))
Modify the variables at the top of the scripts to match your environment and quota.
Enjoy,
JJ
The bsnl.sh script will download your usage information from BSNL, an ISP in India, and will output the number to a fixed file for check_bsnl to read. It will calculate your usage in %, depending on the day of the month. Schedule it with cron or call it from the perl script.
I use a cron job as I used to have it email me the numbers on a daily basis. Then I got clever and implemented Nagios, which will email me only when required.
Usage:
Example, if your monthly cap is 50GB and you've used 30GB on day 15. Its status will be critical as you're on target to use 60GB by the end of the month.
If usage on the 15th day is 10GB, status will be "OK", as you're usage looks like it will be 20GB of your 50GB quota by the end of the month.
Sample output on day 30:
check_bsnl: OK (Usage is 30.0 GB of 50.0 GB, (60.0%))
Modify the variables at the top of the scripts to match your environment and quota.
Enjoy,
JJ
Reviews (0)
Be the first to review this listing!