Score:1

What does the State Repository Service do on Windows Server Core?

nr flag

My Zabbix monitor has been complaining for a while now that the State Repository Service (StateRepository) is not running on one my Windows 2022 Server Core machines, despite being set to automatic startup. Looking at system logs, the service seems to run every day for a couple of minutes (at a different time on each machine) and then stop again, after a series of not-very-informative log messages, but no errors.

I am fairly confident that this is not a real problem, and the Zabbix item just makes the wrong assumption that the service needs to be constantly running, however I would like to get to the bottom of it. As far as I can tell from the Internet, this service is mainly meant to store the state of Edge (browser). Why would it even be installed on Server Core? Does it do anything useful? Am I safe to just disable it? The most relevant Microsoft documentation I can find simply says "No Guidance" (that is for Server 2016 with Desktop experience though), so I'm most inclined to disable the check and leave the service alone, but any guidance would be appreciated if anyone has any more insight on this service.

cn flag
This isn't specific to the State Repository Service. There are *many* services that run on-demand, triggered by another process or an event, then stop when not needed. It isn't valid for a monitoring solution to alarm on those services.
Score:0
in flag

(Not exactly an answer to the question, but rather to your described situation. Could be useful for others facing the same issue):

What ZABBIX does out of the box with the standard Windows OS templates, is to create items and triggers (by auto-discovery) for all windows services that are set to start Automatically, and then trigger problems when they are not running.

So, this is a case of Microsoft doing semantically dubious things with some special Windows services. (The same happens on Windows 2022 Server (non-core), by the way.

What you typically do with these kinds of intermittently-running services, such as StateRepositoryService, edgeupdate, cbdhsvc_.+ is to include them in the regex of services to exclude from auto-discovery.

In the template, in the Discovery rule called Windows services discovery, there are some Filters. One of them being: {#SERVICE.NAME} does not match {$SERVICE.NAME.NOT_MATCHES}. The former being the discovered service macro, and the latter being a "regular" host macro defined on the template itself.

So, to exclude from monitoring of these Auto-start services that are not continuously running, include them in the {$SERVICE.NAME.NOT_MATCHES} macro (found on the template -> Macros list.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.