Crontab configuration
To configure the plugin, it will be necessary to create a crontab that makes an execution of the plugin every certain time.
With the crontab command we can automate tasks, as in this case, automate the execution of this script, to run every X time, configured by the user.
crontab -l → List all scheduled crontabs
crontab -r → Delete crontab
crontab -e → Create a crontab
Cron jobs follow a certain syntax, they have 5 asterisks followed by the command to run.
* * * * * command to execute.
The 5 asterisks
From left to right, the asterisks represent:
1. minutes: from 0 to 59.
2. Hours: from 0 to 23.
3. Day of the month: from 1 to 31.
4. Month: from 1 to 12.
5. Day of the week: from 0 to 6, with 0 being Sunday.
If an asterisk is left, it means "every" minute, hour, day of the month, month or day of the week.
Reserved words: can be used to facilitate the use of the program.
●@monthly: run once a month.
●@weekly: once a week.
●@daily/@midnight: once a day.
●@hourly: every hour.
Therefore it will be necessary to create a crontab that executes the script when we indicate it.
* * * * * </recon_task plugin path with the necessary parameters, as in manual execution>
Example of an hourly execution:
@hourly /<path snmp remote plugin> <path snmp conf> -H <host> -v 3 -u <user> -l <auth level> -a <auth method> -A <auth pass> -x <privacy method> -X <privacy pass>
* Remember to define well in the conf all the parameters, the agent name, the tentacle ip to be able to send the agents of pandora...