-
Li
chevron_right
Quatre années de wallabag.it
Nicolas Lœuillet · pubsub.eckmul.net / linuxfr_news · Monday, 21 December, 2020 - 16:52 · 7 minutes
- label
-
Li
chevron_right
Sortie de PrestaShop 1.7.7.0
Mathieu Ferment · pubsub.eckmul.net / linuxfr_news · Thursday, 17 December, 2020 - 08:44 · 2 minutes
-
Li
chevron_right
CPU Ex0146 PHP8 tout neuf
Da Scritch · pubsub.eckmul.net / linuxfr · Thursday, 15 October, 2020 - 09:11 · 1 minute
-
chevron_right
Dossier : .
Luc Damas · comics.movim.eu / Humeurs · Thursday, 1 October, 2020 - 21:00
-
Sy
chevron_right
Местонахождение устройства в панели проблем Zabbix 3.4
pubsub.slavino.sk / sysadmblog · Sunday, 13 September, 2020 - 08:00 edit · 1 minute
- в таблицу был добавлен заголовок новой колонки Location,
- по каждому из триггеров формируется строка со списком адресов узлов, на значения элементов данных из которых опирается этот триггер,
- строки с адресами через запятую с пробелом склеиваются в одну строку,
- полученная строка добавляется в строку таблицы, в колонку Location.
-
chevron_right
Pédagogie houblonnée : Variable Dynamique en PHP
Luc Damas · comics.movim.eu / Humeurs · Thursday, 10 September, 2020 - 21:00
-
chevron_right
MediaWiki and OAuth2
Warlord · pubsub.slavino.sk / warlord0blog · Tuesday, 21 July, 2020 - 16:22 edit
-
chevron_right
Movim 0.16.1 – Cesco
Timothée Jaussoin · pubsub.movim.eu / Movim · Friday, 6 December, 2019 - 09:50 · 1 minute
-
chevron_right
Little delay for the 0.14 release
Timothée Jaussoin · pubsub.movim.eu / Movim · Saturday, 27 October, 2018 - 20:39 edit
В Zabbix'е к каждому устройству можно прикрепить так называемые «инвентарные данные», среди которых есть поле адреса. Было бы неплохо показывать это поле в списке проблем, чтобы можно было без лишних телодвижений определить адрес устройства. К сожалению, Zabbix не предоставляет для этого штатных средств. Но к счастью, это можно сделать, внеся в исходный текст веб-интерфейса Zabbix небольшую правку.
Интересующий нас виджет находится в файле frontends/php/app/views/monitoring.widget.problems.view.php
Этот виджет фигурирует в списке маршрутов в файле frontends/php/include/classes/mvc/CRouter.php:
'widget.problems.view' => ['CControllerWidgetProblemsView', 'layout.widget', 'monitoring.widget.problems.view'],Класс CControllerWidgetProblemsView описан в файле frontends/php/app/controllers/CControllerWidgetProblemsView.php. Именно в этом классе готовятся данные, которые потом будут использованы в виджете для отображения. Данные об узлах, связанных с триггерами, в этом классе формируется при помощи функции getTriggersHostsList.
Определение функции getTriggersHostsList находится в файле frontends/php/include/triggers.inc.php, для получения списка узлов с триггерами используется метод API host.get :
$db_hosts = $hostidsВнесём правку, которая добавит в этот список строку местоположения устройства из его инвентарных данных:
? API::Host()->get([
'output' => ['hostid', 'name', 'status', 'maintenanceid', 'maintenance_status', 'maintenance_type'],
'selectGraphs' => API_OUTPUT_COUNT,
'selectScreens' => API_OUTPUT_COUNT,
'hostids' => array_keys($hostids),
'preservekeys' => true
])
: [];
Index: zabbix-3.4.12-1+buster/frontends/php/include/triggers.inc.phpТеперь эти данные нужно отобразить в виджете. Внесём соответствующую правку в файл frontends/php/app/views/monitoring.widget.problems.view.php:
===================================================================
--- zabbix-3.4.12-1+buster.orig/frontends/php/include/triggers.inc.php
+++ zabbix-3.4.12-1+buster/frontends/php/include/triggers.inc.php
@@ -2170,6 +2170,7 @@ function getTriggersHostsList(array $tri
'output' => ['hostid', 'name', 'status', 'maintenanceid', 'maintenance_status', 'maintenance_type'],
'selectGraphs' => API_OUTPUT_COUNT,
'selectScreens' => API_OUTPUT_COUNT,
+ 'selectInventory' => ['location'],
'hostids' => array_keys($hostids),
'preservekeys' => true
])
Index: zabbix-3.4.12-1+buster/frontends/php/app/views/monitoring.widget.problems.view.phpКак видно, в правке:
===================================================================
--- zabbix-3.4.12-1+buster.orig/frontends/php/app/views/monitoring.widget.problems.view.php
+++ zabbix-3.4.12-1+buster/frontends/php/app/views/monitoring.widget.problems.view.php
@@ -54,6 +54,7 @@ $table = (new CTableInfo())
$show_recovery_data ? _('Status') : null,
_('Info'),
($data['sortfield'] === 'host') ? [_('Host'), $sort_div] : _('Host'),
+ ($data['sortfield'] === 'location') ? [_('Location'), $sort_div] : _('Location'),
[
($data['sortfield'] === 'problem') ? [_('Problem'), $sort_div] : _('Problem'),
' • ',
@@ -198,11 +199,19 @@ foreach ($data['data']['problems'] as $e
];
}
+ $trigger_hosts = array_values($data['data']['triggers_hosts'][$trigger['triggerid']]);
+ $locations = array();
+ foreach($trigger_hosts as $host)
+ {
+ $locations[] = $host['inventory']['location'];
+ }
+
$table->addRow(array_merge($row, [
$show_recovery_data ? $cell_r_clock : null,
$show_recovery_data ? $cell_status : null,
makeInformationList($info_icons),
$triggers_hosts[$trigger['triggerid']],
+ join(', ', $locations),
$description,
(new CCol(
($problem['r_eventid'] != 0)
Značky: #3.4, #debian, #zabbix, #linux, #Linux, #buster, #php
Značky: #Linux, #php, #Web, #authentication, #security, #single-sign-on, #Linux
Only a few weeks after the 0.16 release here is the 0.16.1 one!
This release includes several fixes and a few new features.
Features
You can now share posts to your connected chatrooms :)
Communities layout were a bit redesigned, publication rules are now displayed clearly in the right column and the header shows more information on mobile.
All the messages that you sent in the one to one discussions can now be edited.
The videoconferencing feature was heavily refactored and several issues were fixed during this process. A new XEP was also used partially to improve the call negociation flow, XEP-0353: Jingle Message Initiation.
Fixes
In the database an index was added on the key that was tracking contacts avatars. This sounds maybe a bit technical to you but this small fix boost quite a lot the performances during the login process, when you join a chatroom (especially that one) or when a contact updates his/her avatar. Because it's a database change you should run the database migrations when updating from 0.16 to 0.16.1.
All the entities that are on the XMPP network needs to declare what they are capable of to the others. This allows feature discovery and negociation and is specified in the #XMPP extension XEP-0115: Entity Capabilities. After the big code refactor of the handling of those #capabilities within the Movim codebase some other small improvements and fixes were done to wrap up properly this feature.
Presences sent to MUC are now generated the same way than those sent to contacts, this fixes #711.
DNS resolution errors an timeout are now handled properly displayed during the authentication flow (#368).
The SQL_DATE constant was renamed to MOVIM_SQL_DATE to prevent some naming conflicts (#820).
What's next?
PHP 7.4 was released a few days ago, so the upcoming version will focus on fixing issues to make Movim fully compatible with that version.
This new PHP release also includes an exciting feature that allows #PHP developpers to call directly C libraries in their codes. This could allow #Movim to directly use the libsignal C library and therefore (finally) allow OMEMO end-to-end-encryption to be implemented. This will be a lot of work and verifications so we're not promissing anything anytime soon. Stay calm please!
That's all folks!
As you may have noticed, the 0.14 #release of #Movim is not there yet. We just found out that Movim had serious issues running with #PHP 7.3 RC2, this seems to be caused by some bugs regarding the #sockets management in this new PHP version.
We are currently investigating that and hope that it will be fixed for the final PHP 7.3 release.
Update: The issue seems to come from a bug between php-zmq and PHP 7.3, there is some work in progress to fix the issue, more info there mkoppanen/php-zmq - Fix for PHP 7.3.