Services inspector on Ubuntu

I’m trying to retrieve the list of all services from an Ubuntu BES Client. https://developer.bigfix.com/relevance/reference/string.html#service-string-service shows the inspector exists on Ubuntu for “services” returns an error but it works fine on the RHEL BES client.

Q: operating system
A: Linux Ubuntu 18.04.5 LTS (5.3.0-1020-azure)
T: 4.000 ms

Q: version of client
A: 10.0.2.52
T: 3.000 ms

Q: services
E: The operator "services" is not defined.
T: 3.000 ms

Q: exists service "BESClient"
A: True
T: 6.000 ms

On Ubuntu, interesting that there is no plural “services” inspector:

Q: properties whose (it as string as lowercase contains "service")
A: xinetd services: Xinetd Service
A: xinetd services <string>: Xinetd Service
A: name of <Xinetd Service>: string
A: id of <Xinetd Service>: string
A: protocol of <Xinetd Service>: string
A: flag of <Xinetd Service>: string
A: no access of <Xinetd Service>: string
A: only from of <Xinetd Service>: string
A: port of <Xinetd Service>: integer
A: server of <Xinetd Service>: string
A: server arg of <Xinetd Service>: string
A: socket type of <Xinetd Service>: string
A: type of <Xinetd Service>: string
A: user of <Xinetd Service>: string
A: wait of <Xinetd Service>: boolean
A: disabled of <Xinetd Service>: boolean
A: service <string>: service
A: running service <string>: service
A: relay service: service
A: main gather service: service
A: proxy agent service: service
A: plugin portal service: service
A: webui service: service
A: state of <service>: string
A: version of <service>: version
A: running of <service>: boolean
A: image path of <service>: string
A: file of <service>: file
A: folder of <service>: folder
T: 2.000 ms

Perhaps @alanm could weigh in, but my impression is that the ‘services’ inspector is pretty limited on Red Hat as well. I don’t recall the detail, it may only pick up system-V services and not the newer systemd services, or something along those lines.

Would it help if I built a workaround checking the systemd services files in relevance, or have you already considered that?

My workaround was to just check the existence of a file in /etc/init.d/ so I’m good for the time being but it does seem like a bug when the doc says service is there for Ubuntu but doesn’t mention that the plural “services” is not.

2 Likes

@cstoneba, service inspector is not supported on Ubuntu:
https://developer.bigfix.com/relevance/reference/service.html#service-service

But service <string> inspector is supported:
https://developer.bigfix.com/relevance/reference/service.html#service-string-service

Looks like for service <string>, it only applies for BigFix services.

On Debian, Raspbian, Ubuntu, AIX, HP-UX and Solaris, the inspector only works for BigFix services. The BigFix service names are: BESClient, BESFillDB, BESGatherDB, BESPluginPortal, BESRelay, BESRootServer, BESWebReportsServer and BESWebUI.

It’s a known and documented limitation currently. I do have an open RFE (BFP-I-207) about general improvement of <services> inspector on Unix/Linux, so feel free to “vote” for it and add your specific use-case as comments. Hopefully more votes will mean it’s get committed to sooner.

2 Likes