NetWorker

Last reply by 12-03-2020 Unsolved
Start a Discussion
3 Argentum
477

Notification for missed jobs

Hi, is there a way to set a notification for missed jobs in Networker? In the case of policy Autostart was set to disabled and forgot to enable back.

Replies (3)
4 Beryllium
472

@Aegh, This is a manual error and there is no such intelligence built into NetWorker yet to notify about manual errors.

HTH,
For NetWorker related content - https://www.youtube.com/channel/UC4JLsVyXMyjbQ4i1NaJj5IQ

5 Tungsten
461

Crazyrow is correct - NW will not report what he has not started.

However, what you want is in fact possible, but it will be a challenge.

You must check the 'NSR Protection Policy' resource. Unfortunately, the attributes 'enabled' & 'autostart' are not listed separately - they only exist in the very complex 'policy definition' attribute.

So you first need to run nsradmin with these commands and pipe the output to a text file:

nsradmin> show name; policy definition
nsradmin> p
name: PSS;
policy definition: \
"{\"policyName\":\"PSS\",\"policyComment\":\"\",\"policyProtectionEnable\":fal\
se,\"policyProtectionPeriod\":\"\",\"policySummaryNotification\":{\"policyComp\
letionNotificationExecuteOn\":\"completion\",\"policyCompletionNotificationAct\
ion\":\"nsrlog -f policy_notifications.log\"},\"policyWorkflows\":[{\"workflow\
Name\":\"Workflow1\",\"synthesisRoot\":[\"NSR group/Workflow1\",\"NSR Snapshot\
Policy/Workflow1\"],\"workflowAutostartEnabled\":true,\"workflowComment\":\"\"\
,\"workflowCompletionNotification\":{\"policyCompletionNotificationExecuteOn\"\
:\"ignore\",\"policyCompletionNotificationAction\":\"\"},\"workflowDescription\
\":\"Empty workflow;\",\"workflowEnabled\":true,\"workflowEndtime\":\"21:00\",\
\"workflowGroups\":[\"klhlkh\"],\"workflowInterval\":\"24:00\",\"workflowNexts\
tart\":\"2020-11-27T21:00:00+0100\",\"workflowRestartWindow\":\"24:00\",\"work\
flowStarttime\":\"21:00\"}]}";

nsradmin>q

 

Now you have to filter the output for the appropriate string (workflowAutostartEnabled\":false) and you are almost there ....

If you then script the whole process and run the 'report' as part of your daily check routine, you should get an instant overview.

 

3 Argentum
436

Hi i use this workarround.

 

Dsantibanez_0-1607021569953.png

On Notification command.

smtpmail -s "Politica ${NSR Policy} and Workflow ${NSR Workflow} y Accion ${NSR Action} completada" -h smtpserver -p 25 email@team.fs

in the   email-client  create a rule for this notificacion if have the failed word in the email-body.

Hope it helps.

 

Latest Solutions
Top Contributor