• [^] # Re: reaction show -f json

    Posté par . En réponse à la dépêche reaction, remplaçant de fail2ban. Évalué à 3.

    et une autre option de formatage :

    $ reaction show -f json | jq -r '.ssh.failedlogin' | jq 'to_entries[]'
    {
     "key": "87.227.30.119",
     "value": {
     "actions": {
     "unban": [
     "2024-01-10 04:37:01"
     ]
     }
     }
    }
    {
     "key": "95.156.96.46",
     "value": {
     "actions": {
     "unban": [
     "2024-01-10 00:40:42"
     ]
     }
     }
    }
    ...
    

    ce qui me semble plus simple à exploiter avec JQ.