The REST API of fdmon (Fast Deployment Monitoring) carries up to monitored components, most of the fdmon features, still without agent
Whatever its deployment model (public or private cloud, on-premise), fdmon (Fast Deployment Monitoring) provides 2 levels of REST API :
In fact, the user REST API interacts with the internal REST API in the background. The fdmon Proxy Server acts as a data collector, as well as a kind of "REST API forwarder". It can also act as a local MQTT Broker for IOT monitoring.
So, most of the fdmon GUI features (or blackbox cloud GUI, the as-a-service version of fdmon) are available through the fdmon user REST API, from any server, equipment, or application authorized to establish local HTTPS sessions with the fdmon Proxy Servers (Internet connectivity is not needed to use the REST API).
The fdmon user REST API carries up to monitored components, most of the fdmon features, still without agent.
Rights and permissions policies control the usage of each user REST API call, that is logged and kept according to a retention defined by the customer, for audit purpose.
For example, from any server (Unix or Windows) that can establish local HTTPS sessions with the fdmon Proxy Servers, you can query the fdmon Smart Inventory (that can handle from the cloud platform, billions of data and metrics in a structured way, also called the "fdmon Big Data") with a trivial curl command, without manipulating complex XML or JSON structures unlike most of the solutions of the market (even if this option remains available) :
[ncor@fdmondev01 ~]$ curl -k -f --form group=linux --form attribute=appl/VERSION --form object=python --form cf=LIST https://192.168.0.210/proxy_api/query
awxlab01;python;2.7.5
dockerlab01;python;2.7.5
fdmonvpa01;python;2.7.5
pve01;python;2.7.9-1
test02;python;2.7.5
test04;python;2.7.5
pve03;python;2.7.16-1
test01;python;2.7.5
fdmondev01;python;2.7.5
pve02;python;2.7.16-1
test03;python;2.7.5
[ncor@fdmondev01 ~]$
This command lists all versions of the python package found in the servers of the "linux" CI Group.
To get the free space of root file system for every server of the "guest" CI Group :
[ncor@fdmondev01 ~]$ curl -k -f --form group=guest --form object=/ --form attribute=disk/FREE --form cf=LIST https://192.168.0.210/proxy_api/query
test02;/;7127.007812
test04;/;7127.140625
test01;/;7121.511719
test03;/;7126.988281
[ncor@fdmondev01 ~]$
The "FREE" attribute could be replaced by any other attribute of the "disk" resource (TYPE, SIZE, USED, PERCENT_USED, ...).
To get the total free space of all root file systems, you just have to replace the "LIST" consolidation function parameter (cf) by "SUM", as shown below :
[ncor@fdmondev01 ~]$ curl -k -f --form group=guest --form object=/ --form attribute=disk/FREE --form cf=SUM https://192.168.0.210/proxy_api/query
28502.648437
[ncor@fdmondev01 ~]$
To list all active disk devices of each server of the "guest" CI Group :
[ncor@fdmondev01 ~]$ curl -k -f --form group=guest --form attribute=disk_lat/IOPS --form cf=LIST https://192.168.0.210/proxy_api/query
test02;sda;348
test02;sda1;348
[ncor@fdmondev01 ~]$
领英推荐
The "IOPS" attribute of the "disk_lat" resource could be replaced by any other attribute of the "disk_lat" resource (R_IOPS, W_IOPS, R_KBPS, W_KBPS, IOSIZE, R_LATENCY, W_LATENCY, SVC_TIME, QLEN, PERCENT_BUSY, ...). The standard Technology Packs provided currently by fdmon handle several thousands attributes.
To get the current status of the CPU resource of the test02 server :
[ncor@fdmondev01 ~]$ curl -k -f --form ci=test02 --form resource=cpu https://192.168.0.210/proxy_api/status
orange;1629620539
[ncor@fdmondev01 ~]$
This commands return the current status (orange = critical) of the CPU resource of the test02 server, and its timestamp (when this resource has switched from the previous status to the current one).
To get the status of the CPU resource of the test02 server, one hour ago :
[ncor@fdmondev01 ~]$ curl -k -f --form ci=test02 --form resource=cpu --form timestamp=-3600 https://192.168.0.210/proxy_api/status
green;1629612196
[ncor@fdmondev01 ~]$
To get the status of the CPU resource for all servers of the "linux" CI Group, one hour ago :
[ncor@fdmondev01 ~]$ curl -k -f --form group=linux --form resource=cpu --form timestamp=-3600 https://192.168.0.210/proxy_api/status
...
[ncor@fdmondev01 ~]$
To get the list of processes currently running on the test02 server :
[ncor@fdmondev01 ~]$ curl -k -f --form ci=test02 --form attribute=procs/CMD --form cf=LIST https://192.168.0.210/proxy_api/query
...
[ncor@fdmondev01 ~]$
To get the list of servers of the "linux" CI Group, with a suspected memory leak :
[ncor@fdmondev01 ~]$ curl -k -f --form group=linux --form attribute=mem_leak/TOTAL_DELTA_24h --form cf=LIST https://192.168.0.210/proxy_api/query
[ncor@fdmondev01 ~]$
To get the list of servers with at least one suspicious process in terms of write activity and pattern (Ransomware attack detection) :
[ncor@fdmondev01 ~]$ curl -k -f --form attribute=sec/CMD --form cf=LIST https://192.168.0.210/proxy_api/query
[ncor@fdmondev01 ~]$
And so on ...
You can apply complex filters (with unions or intersections of conditions) on each of the previous query if you need to have a more granular result.
To summarize, all data related to :
can be queried from any server, equipment or application that is authorized to connect to the fdmon user REST API provided locally by the fdmon Proxy Servers, on customer side.
Thanks to the fdmon user REST API, you can send specific metrics and their timestamp to the fdmon Analytics platform, directly from any server, equipment or application, in order to implement, for example, applications instrumentations or extend their observability.
From the fdmon user REST API, you can also activate, deactivate or schedule the Maintenance Mode of a resource or a set of resources for a CI or a group of CI (to disable notification during a planned change).
From any server, equipment or application, you can trigger a task or a complex Workflow, for example :
Here are some other features provided by the fdmon user REST API :
At last, the fdmon user REST API source code (written in PHP) is open and can be modified or extended by the customer, with new specific features (the standard fdmon training includes a session related to both REST API).