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

alert_history is not returning any output #36

Open
jpdhas opened this issue Nov 29, 2015 · 2 comments
Open

alert_history is not returning any output #36

jpdhas opened this issue Nov 29, 2015 · 2 comments

Comments

@jpdhas
Copy link

jpdhas commented Nov 29, 2015

Hiya,

the alert_history is not returning any output.
I have nagios monitoring a server, and there is a critical alert in hard state.

When I do a print of alert_history(:state_type => :hard, :type => :all), it is giving me an empty array.
Does anybody know why that might be?

This is how I am calling the alert_history function

I have my cgi defined

nagios_address = http://<host_name>/nagios/cgi-bin
user = 'user'
pass = 'password'
version = 3
time_format = 'euro'

nag = NagiosHarder::Site.new(nagios_address, user, pass, version, time_format)
print nag.alert_history(:state_type => hard, :type => all)

Thank you.

@tgraham
Copy link
Contributor

tgraham commented Nov 29, 2015

Try using symbols:

This

:state_type => :hard, :type => :all

instead of this

:state_type => hard, :type => all

@jpdhas
Copy link
Author

jpdhas commented Nov 30, 2015

Oh sorry. This is exactly what I did. Did have symbols. And I received an empty array.

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

No branches or pull requests

2 participants