As title,
I copied the fail2ban_stats.sh in /usr/share/cacti/scripts
added the template from the fail2ban archieve but it doesn't display any graph.
Is there someone who get fail2ban work with cacti?
Moderators: Developers, Moderators
-
- Posts: 24
- Joined: Fri Aug 05, 2011 9:21 am
-
- Posts: 24
- Joined: Fri Aug 05, 2011 9:21 am
Re: Is there someone who get fail2ban work with cacti?
Ok, now it displays the graph, the scripts
show correct value if executed directly but graph is blank.
It show, failed nan banned nan.
No one use fail2ban here?
Code: Select all
FAIL2BAN="fail2ban-client"
JAIL=$1
if [ -z $JAIL ]; then
echo "Usage:" `basename $0` "<jail>"
exit
fi
IFS=""
STATS=$($FAIL2BAN status $JAIL)
TOTAL_FAILED=$(echo $STATS | grep "Total failed:" | awk '{ print $5 }')
TOTAL_BANNED=$(echo $STATS | grep "Total banned:" | awk '{ print $4 }')
echo "failed:"$TOTAL_FAILED "banned:"$TOTAL_BANNED
It show, failed nan banned nan.
No one use fail2ban here?
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Is there someone who get fail2ban work with cacti?
Please see 2nd link of my sig for debugging
R.
R.
-
- Posts: 24
- Joined: Fri Aug 05, 2011 9:21 am
Re: Is there someone who get fail2ban work with cacti?
Thanks for the answer.gandalf wrote:Please see 2nd link of my sig for debugging
R.
the fail2ban template doesn't work and it is also unuseful, there is no way to monitor two or more jail since it doesn't let us to specify two or more jail.
No one created a "working and useful" template for fail2ban?
Thanks.
-
- Posts: 24
- Joined: Fri Aug 05, 2011 9:21 am
Re: Is there someone who get fail2ban work with cacti?
this sh scripts want a jail name:
What is a jail name? What should I pass to the scripts?
Code: Select all
FAIL2BAN="fail2ban-client" |
|
JAIL=$1 |
|
if [ -z $JAIL ]; then |
echo "Usage:" `basename $0` "<jail>" |
exit |
fi |
|
IFS="" |
|
STATS=$($FAIL2BAN status $JAIL) |
|
TOTAL_FAILED=$(echo $STATS | grep "Total failed:" | awk '{ print $5 }') |
TOTAL_BANNED=$(echo $STATS | grep "Total banned:" | awk '{ print $4 }') |
|
echo "failed:"$TOTAL_FAILED "banned:"$TOTAL_BANNED
What is a jail name? What should I pass to the scripts?
-
- Posts: 24
- Joined: Fri Aug 05, 2011 9:21 am
Re: Is there someone who get fail2ban work with cacti?
can't get rid of the NAN value.
https://www.dropbox.com/s/e81x2vpaeiexh ... 282%29.PNG
the debug attached on that link.
https://www.dropbox.com/s/e81x2vpaeiexh ... 282%29.PNG
the debug attached on that link.
Who is online
Users browsing this forum: No registered users and 3 guests