Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Agent Parameters has no effect
#1
Hi all,

I'm new on Pandora FMS. Recently, i've created a module that returns the size of a file. When i set the module_min_critical parameter in the pandora_agent.conf file and restart the service, but the warn column continues N/A on the pandora console. The same thing happens when i define the module_group parameter, it's continues without group defined on pandora console.

My module:

module_begin 
module_name Log_Size_BKP-QUA
module_type generic_data
module_exec powershell.exe -command C:\Log_Size.ps1
module_description Log Size BKP-QUA
module_min_critical 501000
module_max_critical 1000000
module_group System
module_end


Powershell script:

$Log_file = "C:\Dados_QUA.txt"

if (Test-Path $Log_file) {
    if ((Get-Item $Log_file).LastWriteTime -ge (Get-Date).Date) {
        $logsize = (Get-ChildItem $Log_file | Measure-Object -Property Length -sum)
        $logsize.sum
        }
    else {
        return 0000
    }
}


I'm attaching how it's showing on pandora console.


Thanks for ur help.

Regards


Attached Files


.jpg   Untitled.jpg (Size: 15.35 KB / Downloads: 2)
 Reply
#2
Hi benhur,

Can you copy the configuration of the module and create it with the min/max critical values again. It will have to start the first time with the assigned values.
Anyway can you say me the version of Pandora server?

Best regards,

vic.
 Reply
#3
(07-21-2017, 07:58 AM)vic Wrote: Hi benhur,

Can you copy the configuration of the module and create it with the min/max critical values again. It will have to start the first time with the assigned values.
Anyway can you say me the version of Pandora server?

Best regards,

vic.

Hi Vic,

Thanks for your reply. I fix the problem recreating the module with another name. Editing a existent module does not work =(

Thanks for ur support =D
 Reply
#4
THis is very helpful post for me.

http://www.muskanrajput.in/
 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes