[ZBXNEXT-1821] add "zabbix" useragent for web monitoring Created: 2013 Jun 13 Updated: 2015 May 06 Resolved: 2015 May 05 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Frontend (F), Installation (I) |
Affects Version/s: | 2.1.0 |
Fix Version/s: | 2.5.0 |
Type: | Change Request | Priority: | Trivial |
Reporter: | Eduards Samersovs (Inactive) | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | httpcheck | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() |
||||||||||||
Issue Links: |
|
Comments |
Comment by richlv [ 2013 Jun 13 ] |
hmm. what is this issue about, why is it a bug ? |
Comment by Alexei Vladishev [ 2013 Jul 17 ] |
Discussed with Eduard. It is about adding a new user agent in the default selection of user agent. It will be useful for filtering out requests coming from Zabbix in web server access log files. Anyway, it is a feature request not a bug. <richlv> ah, ok. updated summary accordingly. the string should be carefully chosen, as it probably should contain mozilla etc references |
Comment by Alexander Vladishev [ 2014 Oct 21 ] |
Related issue: |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 21 ] |
To distinguish zabbix just a "Zabbix" user agent will be enough. As for other user agents, I suggest to offer the following user agents: Explorer:
|
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 21 ] |
(1) The API should also set the default user agent when it's omitted. iivs RESOLVED in svn://svn.zabbix.com/branches/dev/ZBXNEXT-1821 r50071 oleg.egorov CLOSED |
Comment by Ivo Kurzemnieks [ 2014 Oct 21 ] |
(2) No translation string changes. oleg.egorov CLOSED iivs Added translation string: RESOLVED oleg.egorov CLOSED |
Comment by Ivo Kurzemnieks [ 2014 Oct 21 ] |
RESOLVED in svn://svn.zabbix.com/branches/dev/ZBXNEXT-1821 |
Comment by Oleg Egorov (Inactive) [ 2014 Nov 03 ] |
(3) httptest.create { "name": "t4", "hostid": 32309, "steps": [ { "name": "blablabla", "url": "blablabla", "agent": "blablabla" } ] }
iivs "agent" is property of httptest, not httpstep. Zero in combobox is fixed, however. oleg.egorov Via frontend, set agent " " <- spaces. After page saving, agent displaying as IE11 iivs RESOLVED in r50919 oleg.egorov As discussed, please add new define for Zabbix user agent. And fix $fields array. iivs Reverted changes made to $fields because it was getting too ugly, and added constant ZBX_DEFAULT_AGENT. oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2014 Nov 03 ] |
(4) Merge foreach foreach ($httpTests as &$httpTest) { unset($httpTest['templateid']); if (empty($httpTest['hostid']) && !empty($httpTest['applicationid'])) { $dbHostId = DBfetch(DBselect('SELECT a.hostid'. ' FROM applications a'. ' WHERE a.applicationid='.zbx_dbstr($httpTest['applicationid']))); $httpTest['hostid'] = $dbHostId['hostid']; } } unset($httpTest); foreach($httpTests as &$httpTest) { $defaultValues = array( 'verify_peer' => HTTPTEST_VERIFY_PEER_OFF, 'verify_host' => HTTPTEST_VERIFY_HOST_OFF ); check_db_fields($defaultValues, $httpTest); } unset($httpTest); $this->validateCreate($httpTests); // set default user agent "Zabbix" foreach ($httpTests as &$httpTest) { if (!isset($httpTest['agent'])) { $httpTest['agent'] = 'Zabbix'; } } unset($httpTest); iivs RESOLVED in r50456 oleg.egorov CLOSED |
Comment by Volker Fröhlich [ 2014 Nov 05 ] |
Just for reference: If you are monitoring the login page of Exchange webmail, be aware that you may be treated differently with a string it doesn't recognize (-> 401). |
Comment by Oleg Egorov (Inactive) [ 2014 Dec 01 ] |
(5) Browser list changes
And update latest version for Chrome and other browsers iivs RESOLVED in r50953, r50966 oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2014 Dec 02 ] |
TESTED |
Comment by Ivo Kurzemnieks [ 2014 Dec 03 ] |
Implemented in pre-2.5.0 (trunk) r50979 |
Comment by Ivo Kurzemnieks [ 2014 Dec 03 ] |
(6) API documentation updated:
oleg.egorov CLOSED |
Comment by richlv [ 2014 Dec 03 ] |
(7) looks like this should be mentioned in whatsnew, too martins-v Added to: Please review. RESOLVED. iivs Looks good. CLOSED. |
Comment by Oleg Egorov (Inactive) [ 2014 Dec 11 ] |
(9) Was discussed with sasha and iivs iivs RESOLVED in r51137, r51139 oleg.egorov Please review my minor changes in r51189 iivs Thanks! |
Comment by Oleg Egorov (Inactive) [ 2014 Dec 16 ] |
TESTED |
Comment by Ivo Kurzemnieks [ 2014 Dec 16 ] |
Implemented in pre-2.5.0 (trunk) r51216 |
Comment by Alexander Vladishev [ 2014 Dec 19 ] |
(10) [AI] Default value for "agent" should be in database not in the API. sasha RESOLVED in r51271, r51273. oleg.egorov CLOSED |
Comment by Alexander Vladishev [ 2014 Dec 19 ] |
(11) Updated documentation:
oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2014 Dec 30 ] |
(12) API Request: { "templateid": 32344, "hostid": 32344, "name": "API", "steps": [ { "name": "Homepage", "url": "http://mycompany.com", "status_codes": 200, "no": 1 } ] } Response: SQL ERROR: SQL statement execution has failed \"INSERT INTO httptest (templateid,hostid,name,verify_peer,verify_host,variables,headers,httptestid) VALUES ('10106','10106','API2','0','0','','','12') In r51271 was removed:
unset($httpTest['templateid']);
From CHttpTest.php>create sasha It is true, but httptest.create() method does not have any checks for read only parameters. I deleted an incorrect code. Strong validation will be implemented on server side API. oleg.egorov I agree. CLOSED |
Comment by Oleg Egorov (Inactive) [ 2015 Jan 05 ] |
TESTED |
Comment by Alexander Vladishev [ 2015 Jan 06 ] |
Default value for "agent" field was added in pre-2.5.0 (trunk) r51392. |
Comment by richlv [ 2015 May 05 ] |
no rationale was provided why user agent "Zabbix" was chosen (specifically, why no version was included). while adding the version would be easy, the problem is that zabbix inserts that as a fixed string, thus each scenario would use the version in which it was created, not the current version of zabbix. a separate feature request could handle an agent string that would automatically use the current version of zabbix. then the question would be - frontend or server server might be preferred, and then what if a scenario is monitored by a proxy ? |
Comment by Aleksandrs Saveljevs [ 2015 May 05 ] |
A magic string like "Zabbix {VERSION}" could be inserted into the database, in which case server or proxy would automatically use the correct value in place of "{VERSION}". <richlv> created a new feature request - ZBXNEXT-2805 |
Comment by Alexander Vladishev [ 2015 May 05 ] |
(13) Leading and trailing whitespaces in the custom useragent field should be trimmed sasha RESOLVED directly in trunk r53483. oleg.egorov CLOSED |