Pandora FMS Community

reboot warning for windows

obwielnls · 11 dic 2017, 1:27 · 5 mensajes · 59 visitas

  1. Inicio del debate

    I'm trying to get a warning for a server restart.  I've found another post that had a suggested answer but I can't get it to work properly.  The suggestion was: module_begin module_name Reboot Windows module_type generic_data_inc module_exec wmic os get lastbootuptime | head -2 | tail -1 module_min_critical -1 module_max_critical 0.1 module_end But that seems to always return 0 even after several reboots.   The "wmic os get lastbootuptime" does work and returns a value that looks like this: LastBootUpTime 20171210151531.489509-360 This is clearly a date but the Lastboot time string seems to be in there too.   Maybe that's causing a problem?   I know the agent can extract and send this data because I can use the generic data module to grab it and send it.   Is there any way to filter out that LastBootUpTime string?   Bill


    It looks like windows creates an even 6009 on boot in the event log.. Is there a way to get an alert when that pops up? and if so how would it get reset back to green or normal? Bill

  2. I tried this but I get nothing. Not even a new module shows up for the server. module_begin module_name Reboot123 module_type async_string module_source System module_eventcode 6009 module_application EventLog module_pattern unavailable to handle module_description module_end

  3. Hi obwielnls, The user who is making the query has permissions? Best regards, vic.

  4. I can pull the last boot time manually and if I change the module to the generic data it shows up in the console fine. It just seems to not be processed properly. For the second option I was trying I can't answer but I don't know how to test that manually.

  5. Hi obwielnls, You have to search how to make a WMI query and get the data you need then make a module with the execution of the query. Filter the answer to make it easier. Select the module type according to the data returned. Best regards, vic.

Entra en tu cuenta para publicar.