Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds monitoring a folder based on its number of files #100

Merged
merged 4 commits into from
Jan 22, 2015

Conversation

iramello
Copy link
Contributor

No description provided.


def tick
if Dir.exists?(@dir)
metric = `ls -l '#{@dir}'|grep "^-"|wc -l`.to_i
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can write @dir.entries.size - 2 instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good observation! Will change it on a commit below.

@aphyr
Copy link
Collaborator

aphyr commented Jan 22, 2015

Terrific, thank you very much, @iramello. :)

aphyr added a commit that referenced this pull request Jan 22, 2015
Adds monitoring a folder based on its number of files
@aphyr aphyr merged commit 1d1663d into riemann:master Jan 22, 2015
@aphyr
Copy link
Collaborator

aphyr commented Jan 22, 2015

I've added you to the contributor's list as well. :D

@iramello
Copy link
Contributor Author

haha thanks aphyr! :)

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