Skip to content

Nagios plugin that will check a website and compares the content to a specified string or file

License

Notifications You must be signed in to change notification settings

hmg-dev/check_http_content_equals

Repository files navigation

check_http_content_equals

Nagios plugin that will check a website and compares the content to a specified string or file.

License Type

1. Usage

Usage:  check_http_content_equals --url <string> --compare-to <string> [--compare-to-file <string>] [--contains] [--ua <string>] [--cookie <data> [--cookie <data>]]
OR      check_http_content_equals --help
OR      check_http_content_equals --version

2. Examples

2.1 Compare to specified string with custom user-agent

> check_http_content_equals --url "https://blog.fefe.de/?ts=b5ff0762" --compare-to "$(cat example_compare.txt)" --ua "curl/7.37.0"   
[OK] Content matches!
Url:           https://blog.fefe.de/?ts=b5ff0762
----------------------------------------
Diff:

2.2 Compare to content of a specified file

> check_http_content_equals --url "https://blog.fefe.de/?ts=b5ff0762" --compare-to-file "example_compare.txt"   
[OK] Content matches!
Url:           https://blog.fefe.de/?ts=b5ff0762
----------------------------------------
Diff:

2.3 Compare to content of a specified file and set custom cookie

> check_http_content_equals --url "https://blog.fefe.de/?ts=b5ff0762" --compare-to-file "example_compare.txt" --cookie "css=fefe.css"   
[OK] Content matches!
Url:           https://blog.fefe.de/?ts=b5ff0762
----------------------------------------
Diff:

About

Nagios plugin that will check a website and compares the content to a specified string or file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages