Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMAG and version 7.13
Sv translation
languageru

С помощью тестовой утилиты pushapi-util можно отправить в Traffic Monitor события для любых встроенных сервисов и классов, используя встроенный плагин Device Monitor.

Информация
titleПримечание:

В командах в качестве значения атрибута token используйте значение токена Device Monitor. Его можно скопировать в разделе Управление -> Плагины Консоли Управления управления Traffic Monitor.

Примеры отправки событий класса

«Почта»

Почта

Пример 1:

Чтобы отправить в Traffic Monitor событие класса «Почта» сервиса «Электронная почта»почта, используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class email \


--service email \


--evtattr event_name:"Send email" \


--sender email:"mail_sender@mail.ru" \


--receiver email:"mail_receiver1@mail.ru" \


--receiver email:"mail_receiver2@mail.ru" \


--data file:/root/test_email.eml

Где test_email.eml – это файл, содержащий передаваемое письмо. Атрибуты data, sender и receiver являются обязательными.

В Консоли Управления управления Traffic Monitor событие будет выглядеть следующим образом:

Пример 2:

Чтобы отправить в Traffic Monitor событие класса «Почта» сервиса «Веб-почта», используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class email \


--service email_web \


--evtattr event_name:"Send email_web" \


--sender email:"mail_sender@mail.ru" \


--receiver email:"mail_receiver1@mail.ru" \


--data file:/root/test_email.eml

Примеры отправки событий класса

«Беседа»

Беседа

Пример 1:

Чтобы отправить в Traffic Monitor событие класса «Беседа» Беседа для мессенджера ICQ, используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class imchat \


--service im_icq \


--evtattr event_name:"ICQ chat event" \


--receiver icq:IcqReceiver \


--mes icq:IcqSender,"Confidential information"

Атрибуты mes и receiver являются обязательными.

Пример 2:

Чтобы отправить в Traffic Monitor событие класса «Беседа» для  для мессенджера Skype, содержащее метаинформацию об отправителях, используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class imchat \


--service im_skype \


--evtattr event_name:"Skype event" \


--mes "skype:349051292:'{\"display_name\":\"SkypeUser1\",\"login\":\"user1_skype\"}'","Confidential information" \


--mes "skype:349051100:'{\"display_name\":\"SkypeUser2\",\"login\":\"user2_skype\"}'","Thank you"

Здесь для отправителей сообщений указана метаинформация, включающая в себя отображаемое имя и логин отправителя. В Консоли Управления Traffic Monitor событие будет выглядеть следующим образом:

Image Modified

Примеры отправки событий класса

«Печать

Печать, копирование и

сканирование»

сканирование

Чтобы отправить в Traffic Monitor событие класса «Печать, копирование и сканирование» сервиса «Принтер и МФУ», используйте команды следующего вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class mfp \


--service print \


--evtattr event_name:"Print event" \


--receiver dev:"Some Printer Name" \


--data file:/root/test.png,filename:test.png

и

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class mfp \


--service print \


--evtattr event_name:"Print event" \


--receiver dev:"Some Printer Name",print_port_name:"Some print port name",print_location:"Some print location" \


--data file:/root/test.png,print_copies:3,print_job_name:"Some print job name"

Атрибуты receiver и data являются обязательными. Также команда должна содержать один из атрибутов filename и print_job_name.

Примеры отправки событий класса

«Интернет

Интернет-

активность»

активность

Чтобы отправить в Traffic Monitor событие класса «Интернет-активность» одноименного  одноименного сервиса, используйте команду следующего вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class web \


--service web_common \


--evtattr event_name:"Web event1" \


--receiver res:"drive.google.com",res_destination_url:"/file/test" \


--data file:/root/test

Где test – это файл, содержащий POST-запрос. В нашем примере в передаваемом запросе присутствует фраза «строго конфиденциально» строго конфиденциально. При настроенных политиках защиты данных событие будет выглядеть следующим образом:

Image Modified

Атрибуты data и receiver являются обязательными.

Пример отправки событий класса

«Фотосъемка»Для отправки событий класса «Фотосъемка» нет встроенных сервисов, поэтому для этого необходимо зарегистрировать свой сервис и использовать команду следующего вида:

Фотосъемка

Чтобы отправить в Traffic Monitor событие класса Фотосъемка, используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token your_plugin_token_value \


--id
your_company \
 iw \
--class photo \


--service
your_multimedia_service \
 photosof \
--evtattr event_name:"Photo event" \


--receiver ws:"ws1.domain.org",workstation_type:"ws_type_computer" \


--data file:/root/test.png,filename:test.png

Примеры отправки событий класса

«Обмен файлами»

Обмен файлами

Атрибуты receiver, data и destination_file_path обязательны для событий сервисов «Облачные хранилища», «Терминальная сессия», «Сетевые ресурсы», «FTP» и «Съемное устройство».

Атрибуты receiver и data обязательны для событий класса "Обмен файлами" сервиса « сервиса Мессенджеры».

Пример 1:

Чтобы отправить в Traffic Monitor событие класса «Обмен файлами» сервиса «Облачные хранилища», используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service cloud_storage \


--evtattr event_name:"cloud_storage event" \


--sender auth:user_name@iw \


--receiver res:googledrive.com,res_destination_url:"goodledrive.com/user/folder/"  \


--data file:/root/test.png,destination_file_path:"Send file here"

Событие в Консоли Управления управления Traffic Monitor:

Пример 2:

Чтобы отправить в Traffic Monitor событие класса «Обмен файлами» сервиса «Терминальная сессия», используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service terminal_session \


--evtattr event_name:"terminal_session event" \


--sender phone:+79057777777 \


--receiver res:root@test.com \


--data file:/root/test.png,destination_file_path:"test.com/folder"

Пример 3:

Чтобы отправить в Traffic Monitor событие класса «Обмен файлами» сервиса «Сетевые ресурсы», используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service network_resource \


--evtattr event_name:"network_resource event" \


--sender "auth:user_name@iw:'{\"display_name\":\"friend\",\"login\":\"villain\"}'" \


--receiver res:test.com,res_destination_url:"test.com/folder/ "  \


--data file:/root/test.png,destination_file_path:"Send file here"

Событие в Консоли Управления управления Traffic Monitor:

Пример 4:

Чтобы отправить в Traffic Monitor событие класса «Обмен файлами» сервиса «FTP», используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service ftp \


--evtattr event_name:"FTP Event" \


--sender login:villain \


--receiver res:ftp.site.org,res_destination_url:"catalog\catalog\res.file" \


--data file:/root/test.png,destination_file_path:"Send file here"

Пример 5:

Чтобы отправить в Traffic Monitor событие класса «Обмен файлами» сервиса «Съемное устройство», используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service file_copy_removable \


--evtattr event_name:"Copy file on device" \


--receiver dev:"Removable device" \


--data file:/root/test.png,source_file_path:"Copy from here",destination_file_path:"Send file here"

Пример 6:

Чтобы отправить в Traffic Monitor событие класса «Обмен файлами» для  для мессенджера ICQ, используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service im_icq \


--evtattr event_name:"ICQ File Transfer Event" \


--receiver icq:IcqReceiver \


--data file:/root/test.png

Пример 7:

Чтобы отправить в Traffic Monitor событие класса «Обмен файлами» для  для мессенджера Skype, используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service im_skype \


--evtattr event_name:"Skype File Transfer Event" \


--sender skype:SkypeSender \


--receiver skype:SkypeReceiver1 \


--receiver skype:SkypeReceiver2 \


--data file:/root/test.png,filename:test.png

Пример отправки события класса

«Звонок»

Звонок

Чтобы отправить в Traffic Monitor событие класса «Звонок» сервиса «Мессенджеры», используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class voicetalk \


--service im_skype \


--evtattr event_name:"Skype Voice Talk" \


--sender skype:SkypeSender \


--receiver skype:SkypeReceiver \


--data file:/root/sound_msg.wav,call_duration:7

Событие содержит аудиофайл sound_msg.wav, а длительность разговора составляет 7 секунд. В Консоли Управления управления Traffic Monitor аудиофайл будет доступен для скачивания. Атрибуты receiver, data и call_duration обязательны для событий класса «Звонок» сервиса «Мессенджеры».

Примеры отправки событий класса

«Запись мультимедиа»Для отправки событий класса «Запись мультимедиа» нет встроенных сервисов, поэтому для этого необходимо зарегистрировать свой сервис и использовать команду следующего вида:

Запись мультимедиа

Чтобы отправить в Traffic Monitor событие класса Запись мультимедиа, используйте команду вида:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token your_plugin_token_value \


--id
your_company \
 iw \
--class multimedia \


--service
your_multimedia_service \
 videosof \
--evtattr event_name:"
Camera Event
Video event" \


--receiver ws:"ws1.domain.org",workstation_type:"ws_type_computer" \


--data file:/root/video.avi
Sv translation
languageen

With the help of pushapi-util test utility, you can send events for any built-in services and classes to Traffic Monitor using the built-in Device Monitor plugin.

Информация
titleNote
In commands, use Device Monitor token as tokenattribute value. Copy it from Manage->Pluginssection in Management Consoleconsole.

Examples on how to send events of Email class

Example 1:

To send an Email class event of Emailservice to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class email \


--service email \


--evtattr event_name:"Send email" \


--sender email:"mail_sender@mail.ru" \


--receiver email:"mail_receiver1@mail.ru" \


--receiver email:"mail_receiver2@mail.ru" \


--
data file
data file:/root/test_email.eml

In the command above, test_email.eml is a file that contains the message. The data, sender and receiver attributes are required.

In Traffic MonitorManagement Consoleconsole, the event looks as follows:

Example 2:

To send anEmail event of Web email service to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class email \


--service email_web \


--evtattr event_name:"Send email_web" \


--sender email:"mail_sender@mail.ru" \


--receiver email:"mail_receiver1@mail.ru" \


--
data file
data file:/root/test_email.eml

Examples on how to send events of Chat class

Example 1:

To send a Chat Chat class event for ICQ application to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class imchat \


--service im_icq \


--evtattr event_name:"ICQ chat event" \


--receiver icq:IcqReceiver \


--mes icq:IcqSender,"Confidential information"

The mes and receiver attributes are required.

Example 2:

To send a Chat class event for Skype application to Traffic Monitor, use the command below. Note that in this example the event contains metadata about senders.

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class imchat \


--service im_skype \


--evtattr event_name:"Skype event" \


--mes "skype:349051292:'{\"display_name\":\"SkypeUser1\",\"login\":\"user1_skype\"}'","Confidential information" \


--mes "skype:349051100:'{\"display_name\":\"SkypeUser2\",\"login\":\"user2_skype\"}'","Thank you"

The sender metadata includes the displayed name and Skype login name of a sender. In Traffic MonitorManagement Consoleconsole, the event looks as follows:

Image Modified

Examples on how to send events of Printers and MFPs class

To send a Printers and MFPs class event of Print service to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class mfp \


--service print \


--evtattr event_name:"Print event" \


--receiver dev:"Some Printer Name" \


--
data file
data file:/root/test.png,filename:test.png

and

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class mfp \


--service print \


--evtattr event_name:"Print event" \


--receiver dev:"Some Printer Name",print_port_name:"Some print port name",print_location:"Some print location" \


--
data file
data file:/root/test.png,print_copies:3,print_job_name:"
Some print
Some print job name"

The receiver anddata attributes are required. The command should also contain one of the following attributes:filename or print_job_name.

Example on how to send events

of Internet

of Internet Activity class

To send anInternet Activity class event of Web_common service to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class web \


--service web_common \


--evtattr event_name:"Web event1" \


--receiver res:"drive.google.com",res_destination_url:"/file/test" \


--
data file
data file:/root/test

In the command above, test is a file that contains a POST query. In our example, the query contains the strictly confidential phrase. When you configure data protection policies, the event looks as follows:

Image Modified

Thedata andreceiver attributes are required.

Example on how to send events of Photo class

There are no built-in services to send Photo class events. Register your own service and To send a Photo class event to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token your_plugin_token_value \


--id
your_company \
 iw \
--class photo \


--service
your_multimedia_service \
 photosof \
--evtattr event_name:"Photo event" \


--receiver ws:"ws1.domain.org",workstation_type:"ws_type_computer" \


--data
 
 file:/root/test.png,filename:test.png

Examples on how to send events of File Exchange class

The receiver,data and destination_file_path attributes are required for events of Cloud storage,Terminal session,Network resourse,FTPand External device services.

The receiver anddata attributes are required for File Exchangeclass events of Messengers service.

Example 1:

To send File Exchangeclass event of Cloud Storage service, use the command below:pushapi-util \
--host

Блок кода
languagetext
pushapi-util \
--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service cloud_storage \


--evtattr event_name:"cloud_storage event" \


--sender auth:user_name@iw \


--receiver res:googledrive.com,res_destination_url:"goodledrive.com/user/folder/"  \


--
data file
data file:/root/test.png,destination_file_path:"
Send file
Send file here"

In Traffic MonitorManagement Consoleconsole, the event looks as follows:

Example 2:

To send a File exchange class event of Terminal session service to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service terminal_session \


--evtattr event_name:"terminal_session event" \


--sender phone:+79057777777 \


--receiver res:root@test.
com 
com \


--
data file
data file:/root/test.png,destination_file_path:"test.com/folder"

Example 3:

To send a File exchange class event of Network resoursesresources service to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service network_resource \


--evtattr event_name:"network_resource event" \


--sender "auth:user_name@iw:'{\"display_name\":\"friend\",\"login\":\"villain\"}'" \


--receiver res:test.com,res_destination_url:"test.com/folder/ "  \


--
data file
data file:/root/test.png,destination_file_path:"
Send file
Send file here"

 In Traffic Monitor Management Consoleconsole, the event looks as follows:

Example 4:

To send aFile exchange class event of FTP service to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service ftp \


--evtattr event_name:"FTP Event" \


--sender login:villain \


--receiver res:ftp.site.org,res_destination_url:"catalog\catalog\res.file" \


--
data file
data file:/root/test.png,destination_file_path:"
Send file
Send file here"

Example 5:

To send a File exchange class event of External device service to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service file_copy_removable \


--evtattr event_name:"Copy file on device" \


--receiver dev:"Removable device" \


--
data file
data file:/root/test.png,source_file_path:"
Copy from
Copy from here",destination_file_path:"Send file here"

Example 6:

To send a File exchange class event for ICQ application to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service im_icq \


--evtattr event_name:"ICQ File Transfer Event" \


--receiver icq:IcqReceiver \


--data file:/root/test.png

Example 7:

To send a File exchange class event for Skype application to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class fileexch \


--service im_skype \


--evtattr event_name:"Skype File Transfer Event" \


--sender skype:SkypeSender \


--receiver skype:SkypeReceiver1 \


--receiver skype:SkypeReceiver2 \


--
data file
data file:/root/test.png,filename:test.png

Example on how to send events of Call class

To send a Call class event of Messengers service to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token device_monitor_token_value \


--id iw \


--class voicetalk \


--service im_skype \


--evtattr event_name:"Skype Voice Talk" \


--sender skype:SkypeSender \


--receiver skype:SkypeReceiver \


--
data file
data file:/root/sound_msg.wav,call_duration:7

The event contains sound_msg.wav audio file with the call duration of 7 seconds. The file is available for download in Traffic Monitor Management Console. The receiver, data and call_duration attributes are required for Call event classes of Messengers service.

Examples on how to send events of Recording media

 classThere are no built-in services to send events of Recording media class. Register your own service and

 class

To send a Recording media class event to Traffic Monitor, use the command below:

Блок кода
languagetext
pushapi-util \


--host TM_host \


--token your_plugin_token_value \


--id
your_company \
 iw \
--class multimedia \


--service
your_multimedia_service \
 videosof \
--evtattr event_name:"
Camera Event
Video event" \


--receiver ws:"ws1.domain.org",workstation_type:"ws_type_computer" \


--data
 
 file:/root/video.avi