Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move logic inside CLI class and make executable cleaner
- Loading branch information
Max Horbul
committed
Apr 12, 2012
1 parent
2fd59be
commit 2baa98b
Showing
2 changed files
with
18 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'nagios/splunk' | ||
|
||
cli = Nagios::Splunk::CLI.new | ||
cli.parse_options | ||
|
||
client = Nagios::Splunk::RestClient.new(cli.config[:server_url]) | ||
splunk = Nagios::Splunk::Check.new(client) | ||
|
||
status, message = splunk.license_usage(cli.config[:warn], cli.config[:crit]) | ||
|
||
puts message | ||
exit status | ||
exit Nagios::Splunk::CLI.new.run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters