Skip to content

Commit

Permalink
Merge pull request zabbix#368 from bufanda/fix-bind-readme
Browse files Browse the repository at this point in the history
cleanup READMED.md for template_bind_recursive_queries
  • Loading branch information
igorbach authored Jul 26, 2024
2 parents dc8ff14 + 3b670ed commit f5c0328
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 98 deletions.
56 changes: 24 additions & 32 deletions Applications/DNS/template_bind_recursive_queries/5.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,37 @@

## Description

/etc/zabbix/zabbix_agentd.d/userparameter_bind.conf: UserParameter=bind.tcpcl,/bin/cat /tmp/namedtcp.log UserParameter=bind.udpcl,/bin/cat /tmp/namedudp.log --------------- cron every 30 sec: /var/spool/cron/root: SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin 0-59 * * * * /etc/zabbix/custom/named.sh 0-59 * * * * ( sleep 30; /etc/zabbix/custom/named.sh ) /etc/zabbix/custom/named.sh: #!/bin/bash /usr/local/named/sbin/rndc status > /tmp/rndcstatus cat /tmp/rndcstatus | grep tcp | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedtcp.log cat /tmp/rndcstatus | grep recursive | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedudp.log ----------------------------- add key for rndc in config of named
Shows recursive queries on your BIND server. Triggers on excesive usage. Best for caching servers.

## Overview

Shows recursive queries on your BIND server. Triggers on excesive usage. Best for caching servers.
Installation description:

/etc/zabbix/zabbix_agentd.d/userparameter_bind.conf:
``
UserParameter=bind.tcpcl,/bin/cat /tmp/namedtcp.log
UserParameter=bind.udpcl,/bin/cat /tmp/namedudp.log
```



Instalation description:


/etc/zabbix/zabbix\_agentd.d/userparameter\_bind.conf:

UserParameter=bind.tcpcl,/bin/cat /tmp/namedtcp.log
UserParameter=bind.udpcl,/bin/cat /tmp/namedudp.log

---------------
cron every 30 sec:
/var/spool/cron/root:

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
0-59 * * * * /etc/zabbix/custom/named.sh
0-59 * * * * ( sleep 30; /etc/zabbix/custom/named.sh )

chmod +x /etc/zabbix/custom/named.sh:

#!/bin/bash
/usr/local/named/sbin/rndc status > /tmp/rndcstatus
cat /tmp/rndcstatus | grep tcp | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedtcp.log
cat /tmp/rndcstatus | grep recursive | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedudp.log

-----------------------------
add key for rndc in config of named
---------------
cron every 30 sec:
```
/var/spool/cron/root: SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin
0-59 * * * * /etc/zabbix/custom/named.sh
0-59 * * * * ( sleep 30; /etc/zabbix/custom/named.sh )
```
/etc/zabbix/custom/named.sh:
```bash
#!/bin/bash
/usr/local/named/sbin/rndc status > /tmp/rndcstatus
cat /tmp/rndcstatus | grep tcp | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedtcp.log
cat /tmp/rndcstatus | grep recursive | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedudp.log
```
-----------------------------

add key for rndc in config of named

## Macros used

Expand All @@ -64,4 +57,3 @@ There are no discovery rules in this template.
## Triggers

There are no triggers in this template.

56 changes: 24 additions & 32 deletions Applications/DNS/template_bind_recursive_queries/5.4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,37 @@

## Description

/etc/zabbix/zabbix_agentd.d/userparameter_bind.conf: UserParameter=bind.tcpcl,/bin/cat /tmp/namedtcp.log UserParameter=bind.udpcl,/bin/cat /tmp/namedudp.log --------------- cron every 30 sec: /var/spool/cron/root: SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin 0-59 * * * * /etc/zabbix/custom/named.sh 0-59 * * * * ( sleep 30; /etc/zabbix/custom/named.sh ) /etc/zabbix/custom/named.sh: #!/bin/bash /usr/local/named/sbin/rndc status > /tmp/rndcstatus cat /tmp/rndcstatus | grep tcp | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedtcp.log cat /tmp/rndcstatus | grep recursive | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedudp.log ----------------------------- add key for rndc in config of named
Shows recursive queries on your BIND server. Triggers on excesive usage. Best for caching servers.

## Overview

Shows recursive queries on your BIND server. Triggers on excesive usage. Best for caching servers.
Installation description:

/etc/zabbix/zabbix_agentd.d/userparameter_bind.conf:
``
UserParameter=bind.tcpcl,/bin/cat /tmp/namedtcp.log
UserParameter=bind.udpcl,/bin/cat /tmp/namedudp.log
```



Instalation description:


/etc/zabbix/zabbix\_agentd.d/userparameter\_bind.conf:

UserParameter=bind.tcpcl,/bin/cat /tmp/namedtcp.log
UserParameter=bind.udpcl,/bin/cat /tmp/namedudp.log

---------------
cron every 30 sec:
/var/spool/cron/root:

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
0-59 * * * * /etc/zabbix/custom/named.sh
0-59 * * * * ( sleep 30; /etc/zabbix/custom/named.sh )

chmod +x /etc/zabbix/custom/named.sh:

#!/bin/bash
/usr/local/named/sbin/rndc status > /tmp/rndcstatus
cat /tmp/rndcstatus | grep tcp | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedtcp.log
cat /tmp/rndcstatus | grep recursive | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedudp.log

-----------------------------
add key for rndc in config of named
---------------
cron every 30 sec:
```
/var/spool/cron/root: SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin
0-59 * * * * /etc/zabbix/custom/named.sh
0-59 * * * * ( sleep 30; /etc/zabbix/custom/named.sh )
```
/etc/zabbix/custom/named.sh:
```bash
#!/bin/bash
/usr/local/named/sbin/rndc status > /tmp/rndcstatus
cat /tmp/rndcstatus | grep tcp | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedtcp.log
cat /tmp/rndcstatus | grep recursive | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedudp.log
```
-----------------------------

add key for rndc in config of named

## Macros used

Expand All @@ -64,4 +57,3 @@ There are no discovery rules in this template.
## Triggers

There are no triggers in this template.

61 changes: 27 additions & 34 deletions Applications/DNS/template_bind_recursive_queries/6.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,39 @@

## Description

/etc/zabbix/zabbix_agentd.d/userparameter_bind.conf: UserParameter=bind.tcpcl,/bin/cat /tmp/namedtcp.log UserParameter=bind.udpcl,/bin/cat /tmp/namedudp.log --------------- cron every 30 sec: /var/spool/cron/root: SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin 0-59 * * * * /etc/zabbix/custom/named.sh 0-59 * * * * ( sleep 30; /etc/zabbix/custom/named.sh ) /etc/zabbix/custom/named.sh: #!/bin/bash /usr/local/named/sbin/rndc status > /tmp/rndcstatus cat /tmp/rndcstatus | grep tcp | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedtcp.log cat /tmp/rndcstatus | grep recursive | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedudp.log ----------------------------- add key for rndc in config of named
Shows recursive queries on your BIND server. Triggers on excesive usage. Best for caching servers.

## Overview

Shows recursive queries on your BIND server. Triggers on excesive usage. Best for caching servers.

Installation description:

/etc/zabbix/zabbix_agentd.d/userparameter_bind.conf:
```
UserParameter=bind.tcpcl,/bin/cat /tmp/namedtcp.log
UserParameter=bind.udpcl,/bin/cat /tmp/namedudp.log
```

---------------
cron every 30 sec:

/var/spool/cron/root:
```
SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin
0-59 * * * * /etc/zabbix/custom/named.sh
0-59 * * * * ( sleep 30; /etc/zabbix/custom/named.sh )
```

/etc/zabbix/custom/named.sh:
```bash
#!/bin/bash
/usr/local/named/sbin/rndc status > /tmp/rndcstatus
cat /tmp/rndcstatus | grep tcp | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedtcp.log
cat /tmp/rndcstatus | grep recursive | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedudp.log
```
-----------------------------




Instalation description:


/etc/zabbix/zabbix\_agentd.d/userparameter\_bind.conf:

UserParameter=bind.tcpcl,/bin/cat /tmp/namedtcp.log
UserParameter=bind.udpcl,/bin/cat /tmp/namedudp.log

---------------
cron every 30 sec:
/var/spool/cron/root:

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
0-59 * * * * /etc/zabbix/custom/named.sh
0-59 * * * * ( sleep 30; /etc/zabbix/custom/named.sh )

chmod +x /etc/zabbix/custom/named.sh:

#!/bin/bash
/usr/local/named/sbin/rndc status > /tmp/rndcstatus
cat /tmp/rndcstatus | grep tcp | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedtcp.log
cat /tmp/rndcstatus | grep recursive | awk '{ print $3 }' | cut -d '/' -f 1 > /tmp/namedudp.log

-----------------------------
add key for rndc in config of named



## Macros used

There are no macros links in this template.
Expand All @@ -64,4 +58,3 @@ There are no discovery rules in this template.
## Triggers

There are no triggers in this template.

0 comments on commit f5c0328

Please sign in to comment.