This is Azure log collector and forwarder. It collects all the Azure activity logs in realtime and stores in file and sends to UDP socket over syslog simultaneously.
- Download and install Azure CLI with
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
- Login into Azure CLI
az login
- Create role assignment by using
az ad sp create-for-rbac --name dev-sp-rbac --sdk-auth > local-sp.json
dev
can be any string in above command- Get the generated
local-sp.json
and store intoresource
directory.
- Schedule running of
main.py
every 5 mins with crontab as follows */5 * * * * python3 main.py
- This project is tested with python3 only.