[ZBX-16149] Server returned invalid UTF-8 sequence Created: 2019 May 20  Updated: 2023 Nov 09

Status: Confirmed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F), Server (S)
Affects Version/s: 4.2.1
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Tammy T Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Test env:
Debian 9.9
Mysql version 10.1.38-MariaDB-0+deb9u1
zabbix db charset: utf8 collation: utf8_bin


Attachments: Text File proof_of_concept_patch.txt    
Issue Links:
Sub-task
part of ZBX-21086 Zabbix 6.0 breaks web scenarios with ... Closed
part of ZBX-23490 Required pattern in Web scenario chec... Closed
Sprint: Sprint 57 (Oct 2019), Sprint 58 (Nov 2019), Sprint 59 (Dec 2019), Sprint 60 (Jan 2020), Sprint 61 (Feb 2020), Sprint 62 (Mar 2020), Sprint 63 (Apr 2020), Sprint 64 (May 2020), Sprint 65 (Jun 2020), Sprint 66 (Jul 2020), Sprint 67 (Aug 2020), Sprint 68 (Sep 2020), Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020)

 Description   

 
I am already with this problem for more than 3 weeks now and is driving me insane.

Trying to create an monitoring via HTTP Agent
Version of Zabbix: 4.2.1
Request Body Type: XML Data
Not Converting to Json, but already tried this option
SSL verified peer/host off but already tried this option on
No HTTP Proxy

looked everywhere what this error means (really) and could not find

Already put the log debug until 5, no luck also

if the return has an iso-8859-1, even with a preprocessor in place, gives an error

Preprocessors I tried to convert the characters, the test of the preprocessor works, but the error persists

==> return value.replace(/ã/g,'a').replace(/ç/g,'c');
==> return unescape(encodeURIComponent(value));

Preprocessors I tried just to extract part of the return (just to confirm the preprocessor was not working)

==> ^(?<=\<ns2:status>)(.*?)(?=\</ns2:status>)$
==> (?<=\<ns2:status>)(.*?)(?=\</ns2:status>)

the logs show that,even with the preprocessing rule, when the ISO characters are not there, the data is inserted in the db, and processed, if not, the error appear right at the moment that the DB is supposed to insert the data and it  is right away discarding the data, like the rules are being completely ignored.

there is 10 preprocessors processes started



 Comments   
Comment by Edgar Akhmetshin [ 2019 May 21 ]

Hello Tammy,

Thank you for reporting the issue. Could you increase log level for poller process for a while and attach compressed log file?

# run 3 times to suppress logging from all processes:
zabbix_server -R log_level_decrease
# run 4 times, to increase logging for a poller processes only:
zabbix_server -R log_level_increase="poller" 

Also please attach HTTP agent item settings.

Regards,
Edgar

Comment by Tammy T [ 2019 May 21 ]

Hello!

 

Thank you for the help

part of the log(put the item to try to collect each 30 seconds even tho is not supported):

 

4840:20190521:095811.624 zbx_ipc_socket_read() code:2 size:871 data:4e 7f 00 00 00 00 00 00 | 04 01 e3 f5 e3 5c e5 16 | 3a 25 01 0f 03 00 00 3c | 73 6f 61 70 3a 45 6e 76 | 65 6c 6f 70 65 20 78 6d | 6c 6e 73 3a 73 6f 61 70 | 3d 22 68 74 74 70 3a 2f | 2f 73 63 68 65 6d 61 73 | 2e 78 6d 6c 73 6f 61 70 | 2e 6f 72 67 2f 73 6f 61 | 70 2f 65 6e 76 65 6c 6f | 70 65 2f 22 3e 3c 73 6f | 61 70 3a 42 6f 64 79 3e | 3c 67 61 74 65 77 61 79 | 53 75 62 6d 69 74 52 65 | 73 70 6f 6e 73 65 20 78
4840:20190521:095811.624 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095811.624 worker_preprocess_value: SUCCEED 0221
4840:20190521:095811.624 In zbx_ipc_socket_write()
4840:20190521:095811.624 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095811.625 In zbx_ipc_socket_read()
4840:20190521:095814.635 zbx_ipc_socket_read() code:2 size:75 data:fe 5a 00 00 00 00 00 00 | 03 01 e6 f5 e3 5c d7 b0 | d8 25 01 0b 00 00 00 31 | 33 32 39 32 37 36 32 31 | 35 00 01 00 00 00 00 00 | 00 00 03 55 d6 3a 4f 00 | 00 00 00 aa f5 e3 5c 9e | e8 8e 0e 01 00 00 00 0a | 01 00 00 00 00 00 01 00 | 00 00 00
4840:20190521:095814.635 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095814.635 worker_preprocess_value(): 1329276215
4840:20190521:095814.635 worker_preprocess_value: SUCCEED 334
4840:20190521:095814.635 In zbx_ipc_socket_write()
4840:20190521:095814.635 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095814.635 In zbx_ipc_socket_read()
4840:20190521:095818.637 zbx_ipc_socket_read() code:2 size:75 data:02 5b 00 00 00 00 00 00 | 03 01 ea f5 e3 5c 10 37 | 03 26 01 0b 00 00 00 31 | 39 30 38 36 38 31 36 32 | 39 00 01 00 00 00 00 00 | 00 00 03 94 c3 c3 71 00 | 00 00 00 ae f5 e3 5c eb | f3 b2 0e 01 00 00 00 0a | 01 00 00 00 00 00 01 00 | 00 00 00
4840:20190521:095818.637 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095818.637 worker_preprocess_value(): 1908681629
4840:20190521:095818.637 worker_preprocess_value: SUCCEED 441
4840:20190521:095818.637 In zbx_ipc_socket_write()
4840:20190521:095818.638 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095818.638 In zbx_ipc_socket_read()
4840:20190521:095841.156 zbx_ipc_socket_read() code:2 size:870 data:4e 7f 00 00 00 00 00 00 | 04 01 01 f6 e3 5c 0b 1f | 55 09 01 0e 03 00 00 3c | 73 6f 61 70 3a 45 6e 76 | 65 6c 6f 70 65 20 78 6d | 6c 6e 73 3a 73 6f 61 70 | 3d 22 68 74 74 70 3a 2f | 2f 73 63 68 65 6d 61 73 | 2e 78 6d 6c 73 6f 61 70 | 2e 6f 72 67 2f 73 6f 61 | 70 2f 65 6e 76 65 6c 6f | 70 65 2f 22 3e 3c 73 6f | 61 70 3a 42 6f 64 79 3e | 3c 67 61 74 65 77 61 79 | 53 75 62 6d 69 74 52 65 | 73 70 6f 6e 73 65 20 78
4840:20190521:095841.156 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095841.156 worker_preprocess_value: SUCCEED 0221
4840:20190521:095841.156 In zbx_ipc_socket_write()
4840:20190521:095841.156 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095841.156 In zbx_ipc_socket_read()
4840:20190521:095845.002 zbx_ipc_socket_read() code:2 size:68 data:49 5c 00 00 00 00 00 00 | 00 01 05 f6 e3 5c 42 de | 24 00 03 2c 09 00 00 00 | 00 00 00 01 00 00 00 00 | 00 00 00 02 00 00 00 00 | 00 1e a0 40 c9 f5 e3 5c | d1 30 02 2a 01 00 00 00 | 0a 01 00 00 00 00 00 01 | 00 00 00 00
4840:20190521:095845.002 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095845.002 worker_preprocess_value(): 2348
4840:20190521:095845.002 worker_preprocess_value: SUCCEED 2348
4840:20190521:095845.002 In zbx_ipc_socket_write()
4840:20190521:095845.002 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095845.002 In zbx_ipc_socket_read()
4840:20190521:095848.003 zbx_ipc_socket_read() code:2 size:68 data:4c 5c 00 00 00 00 00 00 | 00 01 08 f6 e3 5c d0 07 | 32 00 03 2e 01 00 00 00 | 00 00 00 01 00 00 00 00 | 00 00 00 02 00 00 00 00 | 00 60 72 40 cc f5 e3 5c | f5 f5 0d 2a 01 00 00 00 | 0a 01 00 00 00 00 00 01 | 00 00 00 00
4840:20190521:095848.003 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095848.003 worker_preprocess_value(): 302
4840:20190521:095848.003 worker_preprocess_value: SUCCEED 302
4840:20190521:095848.003 In zbx_ipc_socket_write()
4840:20190521:095848.003 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095848.003 In zbx_ipc_socket_read()
4840:20190521:095857.160 zbx_ipc_socket_read() code:2 size:68 data:ed 5a 00 00 00 00 00 00 | 00 01 11 f6 e3 5c 45 24 | 8e 09 03 1e 02 00 00 00 | 00 00 00 01 00 00 00 00 | 00 00 00 02 00 00 00 00 | 00 e0 7d 40 d5 f5 e3 5c | de 8a 92 27 01 00 00 00 | 0a 01 00 00 00 00 00 01 | 00 00 00 00
4840:20190521:095857.160 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095857.160 worker_preprocess_value(): 542
4840:20190521:095857.160 worker_preprocess_value: SUCCEED 542
4840:20190521:095857.160 In zbx_ipc_socket_write()
4840:20190521:095857.160 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095857.160 In zbx_ipc_socket_read()
4840:20190521:095907.830 zbx_ipc_socket_read() code:2 size:88 data:2f 6e 00 00 00 00 00 00 | 03 01 1b f6 e3 5c 00 24 | 83 31 01 0b 00 00 00 32 | 32 31 33 34 39 36 36 34 | 39 00 01 00 00 00 00 00 | 00 00 03 e2 63 ed 83 00 | 00 00 00 df f5 e3 5c ba | b2 af 27 02 00 00 00 0a | 01 00 00 00 00 00 01 00 | 00 00 00 01 02 00 00 00 | 38 00 00 01 00 00 00 00
4840:20190521:095907.830 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095907.830 worker_preprocess_value(): 2213496649
4840:20190521:095907.830 worker_preprocess_value: SUCCEED 16448
4840:20190521:095907.830 In zbx_ipc_socket_write()
4840:20190521:095907.830 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095908.646 zbx_ipc_socket_read() code:2 size:88 data:30 6e 00 00 00 00 00 00 | 03 01 1c f6 e3 5c df 0e | 82 26 01 0b 00 00 00 31 | 31 34 34 36 31 32 38 37 | 31 00 01 00 00 00 00 00 | 00 00 03 ec 0b 34 44 00 | 00 00 00 e0 f5 e3 5c 6c | b0 ba 27 02 00 00 00 0a | 01 00 00 00 00 00 01 00 | 00 00 00 01 02 00 00 00 | 38 00 00 01 00 00 00 00
4840:20190521:095908.646 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095908.646 worker_preprocess_value(): 1144612871
4840:20190521:095908.646 worker_preprocess_value: SUCCEED 46848
4840:20190521:095908.646 In zbx_ipc_socket_write()
4840:20190521:095908.646 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095908.646 In zbx_ipc_socket_read()
4840:20190521:095914.321 zbx_ipc_socket_read() code:2 size:75 data:fe 5a 00 00 00 00 00 00 | 03 01 22 f6 e3 5c 2c 8d | 22 13 01 0b 00 00 00 31 | 33 32 39 32 39 39 35 36 | 31 00 01 00 00 00 00 00 | 00 00 03 37 25 3b 4f 00 | 00 00 00 e6 f5 e3 5c d7 | b0 d8 25 01 00 00 00 0a | 01 00 00 00 00 00 01 00 | 00 00 00
4840:20190521:095914.321 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095914.321 worker_preprocess_value(): 1329299561
4840:20190521:095914.321 worker_preprocess_value: SUCCEED 391
4840:20190521:095914.321 In zbx_ipc_socket_write()
4840:20190521:095914.321 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095914.321 In zbx_ipc_socket_read()
4840:20190521:095918.323 zbx_ipc_socket_read() code:2 size:75 data:02 5b 00 00 00 00 00 00 | 03 01 26 f6 e3 5c 53 0e | 4d 13 01 0b 00 00 00 31 | 39 30 38 37 31 31 36 31 | 32 00 01 00 00 00 00 00 | 00 00 03 9d 2b c4 71 00 | 00 00 00 ea f5 e3 5c 10 | 37 03 26 01 00 00 00 0a | 01 00 00 00 00 00 01 00 | 00 00 00
4840:20190521:095918.324 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095918.324 worker_preprocess_value(): 1908711612
4840:20190521:095918.324 worker_preprocess_value: SUCCEED 502
4840:20190521:095918.324 In zbx_ipc_socket_write()
4840:20190521:095918.324 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095918.324 In zbx_ipc_socket_read()
4840:20190521:095945.155 zbx_ipc_socket_read() code:2 size:68 data:49 5c 00 00 00 00 00 00 | 00 01 41 f6 e3 5c d1 6b | 3d 09 03 64 0a 00 00 00 | 00 00 00 01 00 00 00 00 | 00 00 00 02 00 00 00 00 | 00 58 a2 40 05 f6 e3 5c | 42 de 24 00 01 00 00 00 | 0a 01 00 00 00 00 00 01 | 00 00 00 00
4840:20190521:095945.155 End of zbx_ipc_socket_read():SUCCEED
4840:20190521:095945.155 worker_preprocess_value(): 2660
4840:20190521:095945.155 worker_preprocess_value: SUCCEED 2660
4840:20190521:095945.155 In zbx_ipc_socket_write()
4840:20190521:095945.155 End of zbx_ipc_socket_write():SUCCEED
4840:20190521:095945.155 In zbx_ipc_socket_read()
4840:20190521:095948.155 zbx_ipc_socket_read() code:2 size:68 data:4c 5c 00 00 00 00 00 00 | 00 01 44 f6 e3 5c 4d ba | 48 09 03 2e 01 00 00 00 | 00 00 00 01 00 00 00 00 | 00 00 00 02 00 00 00 00 | 00 e0 72 40 08 f6 e3 5c | d0 07 32 00 01 00 00 00 | 0a 01 00 00 00 00 00 01 | 00 00 00 00

 

About the configuration, unfortunately I can not send completely as contains third party personal information in the XML (I will mask as [data])

Item: 

Name IRPFEXERCICIOIMG

Key api.IRPFEXERCICIOIMG

URL: (its my company's aplication api. sorry, was not allowed to publish the url of the API. but is HTTPS, and it returns iso-8859-1, can you reproduce with an API that returns the word não e ação?)

Query Fields none

Request Type POST

Timeout 60s

Request Body Type  XML Data

*Request Body (*its going to be kinda redacted, but hope it helps)

<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<S:Body>
<[redaction] xmlns="[redaction]" xmlns:ns2="[redaction]xsd">
<pLogin>[redaction]</pLogin>
<pPassword>[redaction]</pPassword>
<pCostCenterId>[redaction]</pCostCenterId>
<pGroupId>[redaction]</pGroupId>
<pOperationId/>
<pEnvironmentId>[redaction]</pEnvironmentId>
<pSubmit>
<ns2:[redaction]>false</ns2:[redaction]>
<ns2:[redaction]>false</ns2:[redaction]>
<ns2:[redaction]>90</ns2:[redaction]>
<ns2:layoutId>[redaction]</ns2:layoutId>
<ns2:params>
<ns2:name>[redaction]</ns2:name>
<ns2:value>[redaction]</ns2:value>
</ns2:params>
<ns2:params>
<ns2:name>[redaction]</ns2:name>
<ns2:value/>
</ns2:params>
<ns2:params>
<ns2:name>[redaction]</ns2:name>
<ns2:value/>
</ns2:params>
<ns2:params>
<ns2:name>CPF</ns2:name>
<ns2:value>[redaction]</ns2:value>
</ns2:params>
<ns2:params>
<ns2:name>[redaction]</ns2:name>
<ns2:value>[redaction]</ns2:value>
</ns2:params>
<ns2:params>
<ns2:name>datanascimento</ns2:name>
<ns2:value>[redaction]</ns2:value>
</ns2:params>
<ns2:retake>1</ns2:retake>
<ns2:retakeParallel>0</ns2:retakeParallel>
<ns2:siteId>[redaction]</ns2:siteId>
<ns2:timeout>15</ns2:timeout>
</pSubmit>
</[redaction]>
</S:Body>
</S:Envelope>

Headers none

Required Status Codes 200

Follow redirects check

Retrieve Mode body (but tried headers and body with no success)

Convert to JSON no (but try to check with no success)

HTTP Proxy no

HTTP Authentication no

SSL verify Peer no (but tried yes)

SSL verify Host no (but tried yes)

SSL Certificate file none

SSL Key File none

SSL Key Password none

Host Interface 127.0.0.1:10050

Type of Information Text

Update Interval 30s

Enable trapping no

Preprocessing  the ones I tried are in the description

 

 

 

Comment by Edgar Akhmetshin [ 2019 May 27 ]

Hello Tammy,

The problem cannot be reproduced on the test bench: Zabbix 4.2.1/Ubuntu 18.04.02/Apache2/MariaDB 10.1 and iso-8859-1 set for the Apache2 web server. Also you have unescaped character in the regex:

# example from you:
^(?<=\<ns2:status>)(.*?)(?=\</ns2:status>)$
# working:
^(?<=\<ns2:status>)(.*?)(?=\<\/ns2:status>)$

Also i see type mismatch from the screenshot above and settings posted later. Could you you clarify this moment?

Regards,
Edgar

Comment by Tammy T [ 2019 May 31 ]

Hello There!

 

which type mismatch?

well, trying a lot of things here, even tried update to 4.2.2. nothing.

Comment by Andris Mednis [ 2019 Jun 06 ]

if the return has an iso-8859-1, even with a preprocessor in place, gives an error

Preprocessors I tried to convert the characters, the test of the preprocessor works, but the error persists

==> return value.replace(/ã/g,'a').replace(/ç/g,'c');

What if you try
==> return value.replace(/\xe3/g,'a').replace(/\xe7/g,'c');
instead (for replacing iso-8859-1 ã and ç)?

Comment by Edgar Akhmetshin [ 2019 Jul 19 ]

Hello Tammy,

Could you upgrade to 4.0.10/4.2.4 version and check with regex provided by you and with one provided by andris?

Regards,
Edgar

Comment by hobbit2000 [ 2019 Oct 02 ]

Hello all!

I have the same problem. My Zabbix server version is 4.2.4.

It's clear to understand why is it happen by source code of poller.

.\zabbix-4.2.6.tar\zabbix-4.2.6\src\zabbix_server\poller\checks_http.c:

if (FAIL == zbx_is_utf8(body.data))
{
    SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Server returned invalid UTF-8 sequence"));
    goto clean;
}

  

So, I have to use external check for run curl script to get the web page with invalid UTF-8 sequence.

It is real to add ability to skipping UTF-8 sequences in HTTP agent?

Comment by Andris Mednis [ 2019 Oct 09 ]

How to reproduce with 4.2:

  1. Create a web page for testing. For example, start LibreOffice Writer and write one-line document with non-Latin characters:
            Tīmekļa lappuse testam ar latviešu burtiem.
  2. Export the document in "XHTML (xtml, xhtml)" format, as file 'test_page_utf8.html'.
  3. Convert the web-page to ISO-8859-13 encoding:
    $ iconv -fUTF8 -tISO-8859-13 < test_page_utf8.html | sed -e's/UTF-8/ISO-8859-13/' -e's/utf-8/iso-8859-13/' >test_page_iso8859-13.html
    
  4. You may want to open both pages ('test_page_utf8.html' and 'test_page_iso8859-13.html') in browser to see if they are properly displayed.
  5. Put both pages on a Web server.
  6. Configure items for monitoring both pages in Zabbix. Set  "Retrieve mode: Body".
  7. Observe that 'test_page_utf8' monitors as expected, but for 'test_page_iso8859-13' its item is "Not supported" with error message "Server returned invalid UTF-8 sequence".

Preprocessing step with replacing non-Latin one-byte ISO-8859-13 characters with UTF-8 charcters like

JavaScript:  return value.replace(/\xee/g,'ī').replace(/\xef/g,'ļ').replace(/\xf0/g,'š');

does not help - the item is already "Not supported".

Comment by Vladislavs Sokurenko [ 2019 Oct 15 ]

related issue:
ZBXNEXT-4694

Comment by Andris Mednis [ 2019 Oct 16 ]

Even if we disable the check with zbx_is_utf8() in get_value_http() and get a web-page into preprocessing with JavaScript, it still does not allow to replace non-Latin one-byte ISO-8859-13 characters with UTF-8 charcters:

Replacing codes less than 128 works:

return value.replace(/a/g,'ī');
return value.replace(/\x61/g,'ī');
return value.replace(/\x6D/g,'ī');
return value.replace(/\x6d/g,'ī');
return value.replace(/\u006d/g,'ī');

Replacing codes above than 127 DOES NOT work:

return value.replace(/\xee/g,'ī');
return value.replace(/\xEE/g,'ī');
return value.replace(/\u00ee/g,'ī');
return value.replace(/\u00EE/g,'ī');

Comment by Andris Mednis [ 2019 Oct 16 ]

While ZBXNEXT-4694 calls for adding a dedicated preprocessing option for converting into UTF8 from all data sources, I'm not sure it can be easily implemented in already released versions.

Here is a quick attempt to solve the issue for released versions, only for "HTTP agent" items.

The idea is to add an optional parameter to "HTTP agent" item key to specify encoding. For example:

test_page_iso8859-13_body[iso8859-13]

If 'encoding' parameter is not specified, UTF8 is assumed.
proof_of_concept_patch.txt illustrates the solution (do NOT use it on production system, it is not reviewed!)

Comment by Glebs Ivanovskis [ 2019 Oct 16 ]

HTTP agent can read charset from Content-Type header and convert page body to UTF-8 automatically. This would be enough to cover reporter's use case and seems to be an absolutely logical thing to do.

Comment by Andris Mednis [ 2019 Oct 16 ]

Yes, if there are headers specifiying encoding. I thought it is about monitoring old web-pages.
Is Content-Type HTTP header always required? says the headers are "recommended".

I imagine there could be an old piece of hardware with old firmware serving not quite "best practice" web pages. 

Comment by Pascal Uhlmann [ 2020 Jan 30 ]

I get the same error in a little bit different scenario and with Zabbix 4.4.5. It looks like Zabbix doesn't handle the Content-Type headers properly with redirects. As you can see with the following test using wget the initial request resturns Content-Type: text/html; charset=UTF-8 and redirects to another location. The subsequent request then returns Content-Type: text/html; charset=ISO-8859-1. So I suspect Zabbix to use the first header while working on the second requests response body:

root@localhost:~# wget -O /dev/null -S https://google.com
--2020-01-30 12:12:37-- https://google.com/
Resolving google.com (google.com)... 172.217.23.78, 2a00:1450:4016:805::200e
Connecting to google.com (google.com)|172.217.23.78|:443... connected.
HTTP request sent, awaiting response...
 HTTP/1.1 301 Moved Permanently
 Location: https://www.google.com/
 Content-Type: text/html; charset=UTF-8
 Date: Thu, 30 Jan 2020 11:12:37 GMT
 Expires: Sat, 29 Feb 2020 11:12:37 GMT
 Cache-Control: public, max-age=2592000
 Server: gws
 Content-Length: 220
 X-XSS-Protection: 0
 X-Frame-Options: SAMEORIGIN
 Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000
Location: https://www.google.com/ [following]
--2020-01-30 12:12:37-- https://www.google.com/
Resolving www.google.com (www.google.com)... 172.217.22.228, 2a00:1450:4016:801::2004
Connecting to www.google.com (www.google.com)|172.217.22.228|:443... connected.
HTTP request sent, awaiting response...
 HTTP/1.1 200 OK
 Date: Thu, 30 Jan 2020 11:12:37 GMT
 Expires: -1
 Cache-Control: private, max-age=0
 Content-Type: text/html; charset=ISO-8859-1
 P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
 Server: gws
 X-XSS-Protection: 0
 X-Frame-Options: SAMEORIGIN
 Set-Cookie: 1P_JAR=2020-01-30-11; expires=Sat, 29-Feb-2020 11:12:37 GMT; path=/; domain=.google.com; Secure
 Set-Cookie: NID=197=dIYIKPph2m8BOxD_JLz9v5ogzz6IFnQydqbgYw6osxLfU0UyvLGNAPvlJ19XtKh8Ni2skSwjqlMDpyz5dD8Q4yHW2Pojk8NFCcgReZWQ6grGIg9zJRGwsDKlaUCUQHY8xjDVLCxWmRAT04xcCRicTA3_T_NqHOExRWbYfZXc5sA; expires=Fri, 31-Jul-2020 11:12:37 GMT; path=/; domain=.google.com; HttpOnly
 Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000
 Accept-Ranges: none
 Vary: Accept-Encoding
 Transfer-Encoding: chunked
Length: unspecified [text/html]

Zabbix server log excerpt:

298:20200130:110232.068 zbx_setproctitle() title:'poller #3 [got 0 values in 0.000678 sec, idle 1 sec]'
297:20200130:110232.068 In substitute_simple_macros() data:'3s'
 297:20200130:110232.068 In substitute_simple_macros() data:'https://google.com'
 297:20200130:110232.068 In substitute_simple_macros() data:EMPTY
 297:20200130:110232.068 In substitute_simple_macros() data:EMPTY
 297:20200130:110232.068 In substitute_simple_macros() data:'200'
 297:20200130:110232.068 In substitute_simple_macros() data:EMPTY
 297:20200130:110232.068 In substitute_simple_macros() data:EMPTY
 297:20200130:110232.068 In substitute_simple_macros() data:EMPTY
 297:20200130:110232.068 In substitute_simple_macros() data:EMPTY
 297:20200130:110232.068 In substitute_simple_macros() data:EMPTY
 297:20200130:110232.068 In substitute_simple_macros() data:EMPTY
 297:20200130:110232.068 In get_value() key:'web.fetch["google.com"]'
 297:20200130:110232.068 In get_value_http() request method 'GET' URL 'https://google.com' headers '' message body ''
 297:20200130:110232.286 In int_in_list() list:'200' value:200
 297:20200130:110232.286 End of int_in_list():SUCCEED
 297:20200130:110232.289 End of get_value_http():NOTSUPPORTED
 297:20200130:110232.289 Item [VEEAM:web.fetch["google.com"]] error: Server returned invalid UTF-8 sequence
 297:20200130:110232.290 End of get_value():NOTSUPPORTED
Comment by Glebs Ivanovskis [ 2020 Jan 31 ]

It looks like Zabbix doesn't handle the Content-Type headers properly with redirects.

I'm afraid Zabbix doesn't handle Content-Type headers at all...

Generated at Wed Apr 24 09:19:04 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.