Skip to content

Conversation

@oscar123mendoza
Copy link

This is good for people who want to make sure a file is there and alert if the file is no there. For my case this is good for Nginx matchers. We have several matchers for our micro services and we want to loop through them to confirm they are there.

Pull Request Checklist

Is this in reference to an existing issue?
Nope.

General

  • Update Changelog following the conventions laid out on Keep A Changelog

  • Update README with any necessary configuration snippets

  • Binstubs are created if needed

  • RuboCop passes

  • Existing tests pass

New Plugins

  • Tests

  • Add the plugin to the README

  • Does it have a complete header as outlined here

Purpose

Known Compatablity Issues

This is good for people who want to make sure a file is there and alert if the file is no there. For my case this is good for Nginx matchers. We have several matchers for our micro services and we want to loop through them to confirm they are there.
@oscar123mendoza oscar123mendoza deleted the patch-2 branch August 16, 2019 19:34
@oscar123mendoza oscar123mendoza restored the patch-2 branch August 16, 2019 19:35
Copy link
Member

@majormoses majormoses left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this a bit over slack and I gave some suggestions/pointers.

@oscar123mendoza
Copy link
Author

$ /opt/sensu/embedded/bin/check-file-exists.rb -c "/etc/sensu/conf.d/checks/psql-pointer-process-check.json"
CheckFileExists CRITICAL: 1 matching file(s) found: /etc/sensu/conf.d/checks/psql-pointer-process-check.json

$ /opt/sensu/embedded/bin/check-file-exists.rb -w "/etc/sensu/conf.d/checks/psql-pointer-process-check.json"
CheckFileExists WARNING: 1 matching file(s) found: /etc/sensu/conf.d/checks/psql-pointer-process-check.json

$ /opt/sensu/embedded/bin/check-file-exists.rb -u "/etc/sensu/conf.d/checks/psql-pointer-process-check.json"
CheckFileExists UNKNOWN: 1 matching file(s) found: /etc/sensu/conf.d/checks/psql-pointer-process-check.json

$ /opt/sensu/embedded/bin/check-file-exists.rb -p "/etc/sensu/conf.d/checks/psql-pointer-process-check.json"     
CheckFileExists OK: Matching file(s) found: /etc/sensu/conf.d/checks/psql-pointer-process-check.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants