Seamless AI: Queries Simplified in Log Server

Picture of Shamas Demoret
Shamas Demoret
Technical Content Manager
Log Server includes built-in support for Anthropic, Mistral, and Open AI if you wish to use a 3rd party provider. To set this up, navigate to the Admin > Global Settings menu

Artificial Intelligence has captured the world’s attention and imagination over the last few years. As AI models advance and become more accessible, and as users refine their skills, this technology is poised to drive sweeping change—not just in IT, but across industries in the coming years. An important question to ask yourself about AI is: what are solid use-cases in my industry? AI is just as fallible as any other software, and even carefully configured human-devised automation carries risks, so in what ways can it be safely used to increase productivity while limiting risk?

One great answer to these questions is built right into Nagios Log Server. You’re probably already using a variety of custom queries in Nagios Log Server to help you narrow down your collected data into important subsets for your Dashboards and Alerts, but may not be aware that Log Server includes the option to generate queries with AI. In this article, we’ll discuss the capabilities and how-to’s of this awesome experimental feature.

Setting up the AI

You have multiple options to choose from when selecting the best AI model to generate your queries. Log Server includes built-in support for Anthropic, Mistral, and Open AI if you wish to use a 3rd party provider. To set this up, navigate to the Admin > Global Settings menu, and scroll down to the Experimental Features section:

The Experimental Features menu section in Nagios Log Server, showing the AI integration options and settings.
Integrating AI with Log Server is quick and easy.

We’ve also documented a self-hosted option for those who would like to run the Nagios Enterprises’ Large Language Models on their own with vLLM. Once you’ve accepted the Disclaimer and chosen your method, you’re ready to go.

Generating Queries

Once you have things set up, it’s time to start making queries. Navigate to Dashboards, and you’ll now notice a new look:

The AI query text input box in the Dashboards page of Nagios Log Server
The prompt input section once AI integration is set up.

Now, you can enter a description of what type of log events you’d like to see. You’ll notice a few examples alternating in the box to give you some ideas. After you punch in what you’re looking for, hit enter and enjoy the sparkling stars animation during the second or two it will take for the query to be generated, then review the results.

You’ll see the filtered results in the various panels of your Dashboard as usual and can click the Advanced Search arrow on the right of the prompt section to review, edit, and manage your AI-generated queries. You can also use this section to add your own handmade queries.

For example, the prompt “show me Linux security events” generated the following query for us:

A Nagios Log Server dashboard showing the AI-generated query for the prompt "show me linux security events".
An AI query for Linux security events.

This can serve as both a quick way to easily generate simple and complex queries for users of all experience levels and a valuable learning resource for those trying to learn how to compose Lucene queries. When useful queries that you may want to use again are generated, be sure to save them.

To combine multiple queries, simply enter another request in the prompt box, and it will be applied to your Dashboard alongside other queries already present. The queries combine with an OR statement, so combined results will be shown, and will be color-coded in Panels such as Events Over Time. You can modify the color representing each query by clicking the small colored circle to the left of their text input boxes, which will open a color wheel popup.

It’s easy to set up and use this powerful feature, making it valuable for users of all skill levels—even for creating the most complex queries.

Share: