Unsolved
1 Rookie
•
82 Posts
0
603
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.
Unsolved
1 Rookie
•
82 Posts
0
603
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.
Top
crazyrov
4 Operator
4 Operator
•
1.3K Posts
0
November 26th, 2020 20:00
@Aegh, This is a manual error and there is no such intelligence built into NetWorker yet to notify about manual errors.
bingo.1
2.4K Posts
0
November 27th, 2020 05:00
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.
Dsantibanez
1 Rookie
1 Rookie
•
82 Posts
0
December 3rd, 2020 10:00
Hi i use this workarround.
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.