Pandora FMS community forums

Full Version: Check last backup data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,
i'm trying to monitor the last backup file data on a windows machine with the pandora agent but i don't know how to do!!
Can someone help me please?

Thanks
Hi

The easy way to monitoring this files, is monitoring with DIR command the backup directory and check the last changes.

Regards
I've try but i'm not much able to work with strings in dos...
i saw that with this commad i can sort my *.TIB files in invert alphabetic order

dir *.tib / OD

but i dont understand how to use it in a module
can you help me please?
Thanks
Hi

Check with this configuration

module_begin
module_name test
module_type generic_data_string
module_exec dir /OD /TW | grep tib | tail -1
module_end

Regards
Thanks Mario,
i used your suggestion to resolve my problem like this

module_begin
module_name Ultimo-Backup
module_type generic_data_string
module_exec dir c:\programmi\pandora_agent\ /OD /TW | grep tib | tail -1 | cut -b -10
module_description Data Ultimo Backup Acronis
module_end

in this way i have only the date without any other info, like i want!!

now if i want to check if the last backup is older than 2 days and set an allert how can i do?

Hi

It's a bit convoluted setup, but it is possible

1º Create a Alert Template with this configuration:
    - Name: Not Change
    - Priority: (The one you want)
    - Condition type: On change and uncheck the box "Trigger when matches the value"
    Below, the text appears >>> The alert would fire when the module value does not change

In the second step you need to configure:
    Time threshold > 2 days, F.e. 1 week
    Min. number of alerts .- It's the most important setting for this alert. If your module interval is 5 minutes, this module run 12 times in an hour, 12x24= 288 times in a day and 288x2=576 times in 2 days. You have to set 576 in this field.
    Max number of alerts. Any number > to Min number of alerts

After this setting, you can now associate the module with this template.

Regards
                                                                   
Wow! you are great!
now i set up all you explained me

i attached the template!

now i' m checking a fake file than never change the last modification date, i hope that the alert fired tomorrow

thanks a lot, i tell you how it's work
Bye
Great!

I recommend, that you use a higher threshold to 2 days (50 hours for example). Thus, in case that a delay occurs in any execution of the module and not run the times that have been set in the time threshold.

Thanks, regards
I've set the threshold to 3 days but it's sent me a lot of mail alert...
the backup run every morning at 2 AM
[quote='fonta link' pid='7691' dateline='1388398318']
I've set the threshold to 3 days but it's sent me a lot of mail alert...
the backup run every morning at 2 AM
[/quote]

Checkout, in the advanced parameters of the module, "Generate Unknown Events" of the module, that could be triggering false alert recovery events. Disable that checkbox and see if works for you.

Pages: 1 2