lozzd/Nagdash

no service alerts

nareshbtech opened this issue · 12 comments

Having issue
the dash board shows the correct host an service count but not the issues
image

Please suggest

What version of nagdash and the nagios-api are you running? Can you manually curl the state of the nagios-api and have the critical services be shown there?

Hi mrtazz
i have cloned both from git today

nagos-api 1.2.2

latest commit 23e4c71
Laurie Denness lozzd authored May 06, 2014

does the API show all the critical services when you curl http://your-nagios-api/state ?

yes it does

for example

"GigabitEthernet0/18": {"active_checks_enabled": "1", "current_attempt": "3", "performance_data": {}, "last_hard_state": "2", "notifications_enabled": "1", "current_state": "2", "downtimes": {}, "plugin_output": "port is up but protocal is down", "last_check": "1400259030", "problem_has_been_acknowledged": "0", "last_state_change": "1395076445", "scheduled_downtime_depth": "0", "comments": {}, "last_notification": "1395076685", "max_attempts": "3"}, "GigabitEthernet0/39": {"active_checks_enabled": "1", "current_attempt": "1", "performance_data": {}, "last_hard_state": "0", "notifications_enabled": "1", "current_state": "0", "downtimes": {}, "plugin_output": "port and protocal is live", "last_check": "1400259099", "problem_has_been_acknowledged": "0", "last_state_change": "1395076712", "scheduled_downtime_depth": "0", "comments": {}, "last_notification": "0", "max_attempts": "3"}, "GigabitEthernet0/37":

any suggestions please

can you post your config.php so it's possible to try and reconstruct the problem?

"10.30.1.69", "port" => "6315", "protocol" => "http", "tag" => "wood", "tagcolour" => "#336699"), // array("hostname" => "192.168.2.68", "port" => "6315", "protocol" => "http", "tag" => "test", "tagcolour" => "#696969"), // array("hostname" => "nagios01.dc3.company.com", "port" => "6315", "protocol" => "http", "tag" => "DC3", "tagcolour" => "#4169E1"), // and so on... // array("hostname" => "example.company.com", "port" => "6315", "protocol" => "http", "tag" => "HOST", "tagcolour" => "#FFA500"), ); // Globally filter out hosts using a regex, if you wish, or leave blank for all. $filter = ""; // Default downtime duration, measured in seconds, for scheduling downtime via the Nagdash interface. $duration = 60*60; // Show the floating spinner when Nagdash is being refreshed. $show_refresh_spinner = true; // sort_by_time: Set this to true to sort by the last state change, e.g. how long the service has been broken. // If set to false, leave to default sorting by hostname instead. $sort_by_time = false; // Enables the tag on HARD service notifications. Enable if you want more eye-catching goodness $enable_blinking = false; # For testing, uncomment this for some errors: //$mock_state_file = './test_data/state'; // End Config

awesome thanks! We just merged a big refactor into master, would you mind testing if the problem still persists in the newest master? Sorry for making you jump through such hoops, just want to make sure we didn't accidentally fix your problem already :)

Hi Mrtazz its still the same, dint show the issues,

I am glad that I could help

i have tried to test the new version but still i am facing the same issue please suggest.

$api_type is not defined anywhere currently, I added it to config.php like this and then it works:

$api_type = "nagios-api";

not sure if that's where it should go

(#25 is the same issue, I think)

I was having a problem with nagdash not loading any hosts or services. I can confirm that adding $api_type to the config file fixes this issue and it works as expected.

Please see pull request #27 for an update to the example configuration file to add this setting.

yes it works now after adding $api_type = "nagios-api"; to the config file

thank you very much