# Using icingacli for monitoring after icingadb

**URL:** <https://community.icinga.com/t/using-icingacli-for-monitoring-after-icingadb/13109>\
**Category:** Icinga 2\
**Tags:** icingacli, icinga2\
**Created:** [January 11, 2024, 10:32pm UTC](https://community.icinga.com/t/using-icingacli-for-monitoring-after-icingadb/13109 "2024-01-11T22:32:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hpreusse](https://community.icinga.com/letter_avatar_proxy/v4/letter/h/5e9695/32.png) [@hpreusse](https://community.icinga.com/u/hpreusse)\
**Post date:** [January 11, 2024, 10:32pm UTC](https://community.icinga.com/t/using-icingacli-for-monitoring-after-icingadb/13109/1 "2024-01-11T22:32:27Z")

</div>

I hope this is a dumb question. Recently we upgraded to Icinga 2.14. Further we migrated to icingdb and had to disable the old monitoring module (the Grafana integration stopped working, when it was enabled). In a few of our scripts we used the old module to get alerts states from services and hosts “icingacli monitoring…”. As the old module is gone, this does not work any more.

How can this be done after icingadb migration? Thanks!

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [January 12, 2024, 8:07am UTC](https://community.icinga.com/t/using-icingacli-for-monitoring-after-icingadb/13109/2 "2024-01-12T08:07:56Z")

</div>

the icingadb module has currently no cli capability.

You can use [icinga2 api](https://icinga.com/docs/icinga-2/latest/doc/12-icinga2-api/) to get services and hoststates states

---

<div class="post-metadata">

**Author:** ![rsx](https://community.icinga.com/user_avatar/community.icinga.com/rsx/32/2094_2.png) [@rsx](https://community.icinga.com/u/rsx)\
**Post date:** [January 12, 2024, 11:01am UTC](https://community.icinga.com/t/using-icingacli-for-monitoring-after-icingadb/13109/3 "2024-01-12T11:01:51Z")

</div>

Another approach is to work with icinga objects directly using icinga’s DSL e.g. [example1](https://community.icinga.com/t/calculating-a-state-over-multiple-services/10522/) or [example2](https://community.icinga.com/t/icinga-command-to-check-status-of-all-services-on-host/11906/).

---

<div class="post-metadata">

**Author:** ![hpreusse](https://community.icinga.com/letter_avatar_proxy/v4/letter/h/5e9695/32.png) [@hpreusse](https://community.icinga.com/u/hpreusse)\
**Post date:** [January 12, 2024, 10:22pm UTC](https://community.icinga.com/t/using-icingacli-for-monitoring-after-icingadb/13109/4 "2024-01-12T22:22:40Z")

</div>

OK, thanks for the hint. Thats what we have in the past until we switched over to icingacli… I just had the hope there would be better solutions. Hilmar

---

<div class="post-metadata">

**Author:** ![hpreusse](https://community.icinga.com/letter_avatar_proxy/v4/letter/h/5e9695/32.png) [@hpreusse](https://community.icinga.com/u/hpreusse)\
**Post date:** [January 12, 2024, 10:29pm UTC](https://community.icinga.com/t/using-icingacli-for-monitoring-after-icingadb/13109/5 "2024-01-12T22:29:03Z")

</div>

Sorry, I don’t really see the relationship between your hints and my question. We used icingacli to get list of services, i.e. list all services with name “a” and status “b”. This list was used to run some scripts, which e.g. restarted icinga agents on remote hosts.

---

<div class="post-metadata">

**Author:** ![rsx](https://community.icinga.com/user_avatar/community.icinga.com/rsx/32/2094_2.png) [@rsx](https://community.icinga.com/u/rsx)\
**Post date:** [January 15, 2024, 8:38am UTC](https://community.icinga.com/t/using-icingacli-for-monitoring-after-icingadb/13109/6 "2024-01-15T08:38:16Z")

</div>

You could create a service that is running through icinga objects and handover services in question to an [EventCommand](https://icinga.com/docs/icinga-2/latest/doc/09-object-types/#eventcommand).

---

<div class="post-metadata">

**Author:** ![Tqnsls](https://community.icinga.com/user_avatar/community.icinga.com/tqnsls/32/5067_2.png) [@Tqnsls](https://community.icinga.com/u/Tqnsls)\
**Post date:** [March 17, 2026, 12:12pm UTC](https://community.icinga.com/t/using-icingacli-for-monitoring-after-icingadb/13109/7 "2026-03-17T12:12:48Z")

</div>

Is there any news regarding a command line interface for icingadb?

The older `icingacli monitoring list hosts --format csv --columns [...]`

or `icingacli monitoring list services --format csv --columns [...]` are so much more comfortable and more handy than sending curl requests against the API.

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [March 17, 2026, 3:50pm UTC](https://community.icinga.com/t/using-icingacli-for-monitoring-after-icingadb/13109/8 "2026-03-17T15:50:07Z")

</div>

still no but you can write a rest api wrapper for the icingadb rest api.

- build a query in icingadb-web
- add ?format=csv or &format=csv (it depends if there is already a ?)
- 
  - [https://youricinga/icingaweb2/icingadb/services?format=csv](https://youricinga/icingaweb2/icingadb/services?format=csv)

- 
  - [https://youricinga/icingaweb2/icingadb/services?host.name=host123&format=csv](https://youricinga/icingaweb2/icingadb/services?host.name=host123&format=csv)
