kloczek / zabbix-templates

Zabbix templates
111 stars 65 forks source link

correct spell problem : retransmitted #4

Closed Jijun closed 6 years ago

Jijun commented 6 years ago

correct spell problem : "retransmitted" should be retransmited

kloczek commented 6 years ago

Hi,

Can you show me "netstat -V" on your system?

Chewbakka-Wakka commented 6 years ago

It should be one of either; "retransmitted" "retransmit" or "retransmits".

kloczek commented 6 years ago

I was aware that this item was for some time in the unsupported state. I remember that it was working on el6. Looks like in earlier versions of the net-tools was the typo and only recently it was corrected.

However, I think that generally, I'll change regexp in this item to the new one:

$ /bin/netstat -s|/bin/sed -n 's/\(.*\) segments retransmitted*/\1/ p'
    582
$ /bin/netstat -s|/bin/sed -n 's/\( *\)\(.*\) segments retransmitted/\2/ p'
582
$

PS. I must finish import templates script.

Jijun commented 6 years ago

i am confused about that my online server version is CentOS Linux release 7.2.1511:

netstat -V
net-tools 2.10-alpha
Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang, Brian Micek and others
+NEW_ADDRT +RTF_IRTT +RTF_REJECT +FW_MASQUERADE +I18N +SELINUX
AF: (inet) +UNIX +INET +INET6 +IPX +AX25 +NETROM +X25 +ATALK +ECONET +ROSE -BLUETOOTH
HW:  +ETHER +ARC +SLIP +PPP +TUNNEL -TR +AX25 +NETROM +X25 +FR +ROSE +ASH +SIT +FDDI +HIPPI +HDLC/LAPB +EUI64 

netstat -s|grep segment
     25184028994 segments received
     25363957817 segments send out
     88295058 segments retransmited
     133814 bad segments received.

my computer is archlinux :

net-tools 2.10-alpha
Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang, Brian Micek and others
+NEW_ADDRT +RTF_IRTT +RTF_REJECT +FW_MASQUERADE -I18N
AF: (inet) +UNIX +INET +INET6 +IPX +AX25 +NETROM +X25 +ATALK -ECONET +ROSE -BLUETOOTH
HW:  +ETHER +ARC +SLIP +PPP +TUNNEL -TR +AX25 +NETROM +X25 +FR +ROSE +ASH +SIT +FDDI +HIPPI +HDLC/LAPB +EUI64 

netstat -s|grep segment
    437274 segments received
    450478 segments sent out
    3203 segments retransmitted
    97 bad segments received

so that make me confused.

kloczek commented 6 years ago

On the bottom of the "OS Linux" template description is:

Notes:
- compliant with EL7 and compatible

CentOS 7.x is EL7 compliant. So don't worry Jijun because according to this note your fix is correct.

Thank you for your patch :)

kloczek commented 6 years ago

Looks like archlinux version which you are using is not fully EL7 compliant.

Chewbakka-Wakka commented 6 years ago

The confusion here is the spelling and where this correction is coming from. T did you see this line from that output?

CentOS Linux release 7.2.1511:

88295058 segments retransmited

Archlinux :

3203 segments retransmitted

The spelling is retransmitted so CentOS Linux release 7.2.1511 has this wrongly in place. So this mistake needs to be corrected in this CentOS release, not in the template.

On 26 January 2018 at 08:33, kloczek notifications@github.com wrote:

On the bottom of the "OS Linux" template description is:

Notes:

  • compliant with EL7 and compatible

CentOS 7.x is EL7 compliant. So don't worry Jijun because according to this note your fix is correct.

Thank you for your patch :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kloczek/zabbix-templates/pull/4#issuecomment-360716489, or mute the thread https://github.com/notifications/unsubscribe-auth/APv6zgrpNpNCZspVXvGEgHWRF7JW4vSrks5tOY33gaJpZM4RslnY .

kloczek commented 6 years ago

I've been testing this on Fedora rawhide.

Nevertheless, it is yet another detail here. In both cases is reported the same version of the netstat. In my case it is:

$ /bin/netstat -V
net-tools 2.10-alpha
Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang, Brian Micek and others
+NEW_ADDRT +RTF_IRTT +RTF_REJECT +FW_MASQUERADE +I18N +SELINUX
AF: (inet) +UNIX +INET +INET6 +IPX +AX25 +NETROM +X25 +ATALK -ECONET +ROSE +BLUETOOTH
HW:  +ETHER +ARC +SLIP +PPP +TUNNEL -TR +AX25 +NETROM +X25 +FR +ROSE +ASH +SIT +FDDI +HIPPI +HDLC/LAPB +EUI64 

To be honest, now I think that this item should be removed from OS Linux template and replaced by item from another template which will be built around /proc/net/snmp, /proc/net/netstat, /proc/net/sctp/snmp content. Reading those files and exposing red data as the metrics could be done over zabbix agent loadable module. This will be better as it will be not using system.run[] and will allow hiding differences in netstat output.

kloczek commented 6 years ago

Another solution is to change regexp to only common part of both spellings. That will be working in both cases.