[ZBX-7760] net.tcp.service[.perf] simple checks poorly documented Created: 2014 Feb 06 Updated: 2017 May 30 Resolved: 2015 May 19 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Documentation (D) |
Affects Version/s: | 2.0.10 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Minor |
Reporter: | Tom M. | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 10 |
Labels: | simplechecks | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
documentation |
Description |
net.tcp.service simple checks are poorly documented, especially for the service parameter. The manual just says (section 6.2.2.5.2 as for 2.0.10):
But there is no indication whether a higher level protocol has been implemented, what it would do, expect, or how it would handle protocol violations. This leads to wrong expectations and assumptions, i.e. one could assume that "http" actually does some HTTP, i.e. sending out a HEAD or GET request and check for a HTTP xxx reply - but it doesn't. HTTP is a bare TCP connection. In contrast, ssh seems to do a real handshake. simple.c in src/libs/zbxsysinfo/simple is the basic workhorse and might be a good starting point for reverse engineering how stuff is implemented. |
Comments |
Comment by Volker Fröhlich [ 2014 Nov 07 ] |
I looked it up a first few in 2.4 to save people from digging it up: smtpCreates a TCP connection and expects the first 3 characters of the response to be "220", followed by either a space or the line ending. No dash must follow "220". Then sends "QUIT" popCreates a TCP connection and expects the first 3 characters of the response to be "+OK", then sends "QUIT" imapCreates a TCP connection and expects the first 4 characters of the response to be "* OK", then sends "at LOGOUT" nntpCreates a TCP connection and expects the first 3 characters of the response to be "200" or "201", then sends "QUIT" ftpCreates a TCP connection and expects a 220 response, then sends "QUIT" httpCreates a TCP connection httpsUses (and only works with) libcurl, does not verify the authenticity of the certificate, does not verify the host name in the SSL certificate, only fetches the response header (HEAD request). tcpCreates a TCP connection Still missing
|
Comment by Igors Homjakovs (Inactive) [ 2015 Apr 20 ] |
Here is updated info for 2.4 and trunk (info for 2.0 and 2.2 is also given if it differs with newer versions): smtp smtp (2.0, 2.2) pop pop (2.0, 2.2) imap imap (2.0, 2.2) nntp nntp (2.0, 2.2) ftp ftp (2.0, 2.2) http https tcp ssh ldap telnet ntp |
Comment by Martins Valkovskis [ 2015 Apr 21 ] |
Added to documentation as: https://www.zabbix.com/documentation/2.0/manual/appendix/items/net.tcp.service_details Linked to from: https://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/simple_checks RESOLVED. asaveljevs Based on the needs of
asaveljevs Removed "simple" from "simple checks" on those pages, because net.tcp.service[] is also available as an agent check. RESOLVED. |
Comment by richlv [ 2015 Apr 21 ] |
(1) really great to see this one finally documented, thanks all "Performs an LDAP search operation." - what do we search for ? does the result (found/not found) affect the outcome of this check, or is it ignored ? igorsh Perhaps the debug message "LDAP - empty sort result." should be changed to "LDAP - empty search result." martins-v Changed to "Opens a connection to an LDAP server and performs an LDAP search operation with filter set to (objectClass=*). Expects successful retrieval of the first attribute of the first entry." RESOLVED. <richlv> thanks, CLOSED |
Comment by richlv [ 2015 Apr 21 ] |
(2) "Unlike the http check..." - maybe that should be "Unlike the other checks..." ? igorsh True. martins-v Changed accordingly. RESOLVED. <richlv> thanks, CLOSED |
Comment by richlv [ 2015 Apr 21 ] |
(3) "checks telnet connection" - seems a bit vague compared to other descriptions igorsh martins-v Changed in documentation. RESOLVED. <richlv> in https://www.zabbix.com/documentation/3.0/manual/config/items/itemtypes/simple_checks we mention what a login prompt is - should we do that here, too ? martins-v I think so. Added. Perhaps even the original sentence could be removed from https://www.zabbix.com/documentation/3.0/manual/config/items/itemtypes/simple_checks, now that there's a special appendix for details. <richlv> ah, that's a mighty good idea - let's remove it from the items table martins-v Done. RESOLVED. <richlv> thanks, CLOSED |
Comment by richlv [ 2015 Apr 21 ] |
(4) default port is documented for 'http', but not for other checks - probably should be (except 'tcp') igorsh martins-v Thanks, added to documentation. RESOLVED. <richlv> thanks, CLOSED |
Comment by Volker Fröhlich [ 2015 Apr 21 ] |
(5) "Creates a TCP connection, sends an ntp packet and expects positive timestamp." – I would say "expects a positive timestamp". What is "a ntp packet"? <richlv> also note that ntp checks will get additional description after completion of asaveljevs Updated the description with a reference to RFC 4330. Please take a look and let me know whether an exact list of validation checks is required. RESOLVED. <richlv> seems to be enough to me, although for pre-3.0 docs we should probably mention that this behaviour changed in this or that version ? asaveljevs Yes, I am planning to mention that "ntp" only started working since this and that version, but on the main item page (https://www.zabbix.com/documentation/2.4/manual/config/items/itemtypes/zabbix_agent) and the plan is to do it under asaveljevs Seems CLOSED. |
Comment by Aleksandrs Saveljevs [ 2015 May 05 ] |
(6) Fixed a typo in SSH check description: it used to say "0\" instead of "0\n". sasha Thanks! CLOSED |