Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
count_lines.sh
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!
count_lines.sh Version 1.02 - Count the lines of the url we get
Usage:
./coung_lines.sh --http <'http://'> --url -u -p --warning <#minimal_lines|amount|#number of keywords> --critical <#minimal_lines critical|amount|#number of keywords> --verbose --mode --splitcharacter <,|}|>|:> --keyword
* -H | --http --> Where do we read from? http:// OR https:// OR ftp://
* -U | --url --> Enter the url without: http(s):// OR ftp://
* -w | --warning --> Warning minimal #number of lines/keywords/bytes(size)/amount
* -c | --critical --> Critical minimal #number of lines/keywords/bytes(size)/amount
-h | --help --> Show help page
-V | --version --> Show version
* -m | --mode --> Mode:
minimal_size : Minimal file size needed (File size must be bigger than Warning & Critical threshold)
maximum_size : Maximum file size needed (File size must be smaller than Warhing & Critical threshold)
minimal_lines : Minimal #number of lines must be above warning & critical Threshold
maximum_lines : Maximum #number of lines must be less than warning & critical Threshold
minimal_calc : Minimal amount that needs to be calculated before warning (Threshold only workss with whole integers)
maximum_calc : Maximum amount that needs to be calculated before warning (Threshold only workss with whole integers)
minimal_keyword : Minimal number of keywords that needs to be found before warning
maximum_keyword : Maximum number of keywords that needs to be found before warning
-k | --keyword --> Keyword: Enter keyword that you want to search, works only in MODE: minimal/maximum _keyword
| --verbose --> Show more information about the steps for troubleshooting purpuses
* -s | --splitcharacter --> With calculating the amount (-m|--mode minimal/maximal _calc you need to set a split character so the script knows
where the fields are split. Sometime all data is presented on one line, then use the split character to split
the line into sperate lines so the script can pars ethe whole thing
-p | --password --> Enter a password if it is needed to access the url
-u | --username --> Enter a if it is needed to access the url
* --> Mandatory
Usage:
./coung_lines.sh --http <'http://'> --url
* -H | --http --> Where do we read from? http:// OR https:// OR ftp://
* -U | --url --> Enter the url without: http(s):// OR ftp://
* -w | --warning --> Warning minimal #number of lines/keywords/bytes(size)/amount
* -c | --critical --> Critical minimal #number of lines/keywords/bytes(size)/amount
-h | --help --> Show help page
-V | --version --> Show version
* -m | --mode --> Mode:
minimal_size : Minimal file size needed (File size must be bigger than Warning & Critical threshold)
maximum_size : Maximum file size needed (File size must be smaller than Warhing & Critical threshold)
minimal_lines : Minimal #number of lines must be above warning & critical Threshold
maximum_lines : Maximum #number of lines must be less than warning & critical Threshold
minimal_calc : Minimal amount that needs to be calculated before warning (Threshold only workss with whole integers)
maximum_calc : Maximum amount that needs to be calculated before warning (Threshold only workss with whole integers)
minimal_keyword : Minimal number of keywords that needs to be found before warning
maximum_keyword : Maximum number of keywords that needs to be found before warning
-k | --keyword --> Keyword: Enter keyword that you want to search, works only in MODE: minimal/maximum _keyword
| --verbose --> Show more information about the steps for troubleshooting purpuses
* -s | --splitcharacter --> With calculating the amount (-m|--mode minimal/maximal _calc you need to set a split character so the script knows
where the fields are split. Sometime all data is presented on one line, then use the split character to split
the line into sperate lines so the script can pars ethe whole thing
-p | --password --> Enter a password if it is needed to access the url
-u | --username --> Enter a if it is needed to access the url
* --> Mandatory
Reviews (0)
Be the first to review this listing!