Histórico da Página
Composition Setup |
---|
import.css=/download/attachments/6062824/tecnologia.css
|
Pagetitle | ||||
---|---|---|---|---|
|
...
Bloco de código | ||
---|---|---|
| ||
ReadMetrics( [ Metric_Name ] ) |
Parâmetros
Nome | Tipo | Descrição | Obrigatório | Referência |
---|---|---|---|---|
Metric_Name |
vetor | Quando informado, filtra objeto de saída inserindo apenas a métrica que contem o nome informado. |
Retorno
Nome | Tipo | Descrição |
---|---|---|
cRet | caractere | Retorna uma string, no formato json, com as métricas coletadas. |
Exemplos
Bloco de código | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
User Function exemplo() cRet := "" cRetLocal FilterOne := {"memory_swap_total"} Local FilterEmpty :={} Local FilterInvalid := ReadMetrics({"InvalidMetric"} Local FilterTwo :={"memory_swap_total", "startdate"} cRet := ReadMetrics(FilterOne) Conout(cRet) //Imprime : [{"version":0,"metrics":[{"name":"memory_swap_total","description":"Page File Total","collected_in":"25/05/2020 15:14:14.612","unit":"kb","value":23467676}]}] cRet := ReadMetrics(FilterTwo) Conout(cRet) //Imprime: [{"version":0,"metrics":[{"name":"memory_swap_total","description":"Page File Total","collected_in":"27/05/2020 12:27:22.236","unit":"kb","value":23467676},{"name":"startdate","description":"Date when the system was started","collected_in":"27/05/2020 12:26:57.836","value":"27/05/2020 12:26:57"}]}] cRet := ReadMetrics() Conout(cRet) //Imprime: [{"version":0,"metrics":[{"name":"memory_resident","description":"Resident Memory Usage","collected_in":"25/05/2020 15:14:38.979","unit":"kb","value":967760},{"name":"memory_virtual","description":"Virtual Memory Usage","collected_in":"25/05/2020 15:14:38.979","unit":"kb","value":5386272},{"name":"memory_ram_total","description":"Memory Ram Total","collected_in":"25/05/2020 15:14:38.979","unit":"kb","value":16554132},{"name":"memory_ram_free","description":"Memory Ram Free (Available to Use)","collected_in":"25/05/2020 15:14:38.979","unit":"kb","value":8270660},{"name":"memory_ram_used","description":"Memory Ram Usage","collected_in":"25/05/2020 15:14:38.979","unit":"kb","value":8283472},{"name":"memory_swap_total","description":"Page File Total","collected_in":"25/05/2020 15:14:38.979","unit":"kb","value":23467676},{"name":"memory_swap_used","description":"Page File Used","collected_in":"25/05/2020 15:14:38.979","unit":"kb","value":15027124},{"name":"memory_swap_free","description":"Page File Free (Available to Use)","collected_in":"25/05/2020 15:14:38.979","unit":"kb","value":8440552},{"name":"startdate","description":"Date when the system was started","collected_in":"25/05/2020 14:23:28.397","value":"25/05/2020 14:23:28"}]}] cRet := ReadMetrics("inexistente"FilterEmpty) Conout(cRet) //Imprime: [{"version":0,"metrics":[]}] cRet := ReadMetrics(FilterInvalid) Conout(cRet) //Imprime: [{"version":0,"metrics":[]}] Return |
...
Disponível no AppServer a partir da build 19.3.0.xx05
Veja também
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas