I want a script which increments the count when the script runs. Basically I want to send an email notification when I find 10 devices down from the same country and scripts run after every down event.
So if I set the counter as 0, the script then updates the value as 1 but next time when the script runs it checks the counter is set to 0 and again shows the value as 1.
I need to save the previous counter value with respect to thee country name as both the values are not fixed. Also there are
n number of devices belong to
n number of countries.