-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[jamf_pro]: Integration is only sporadically importing device inventory #12021
Comments
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Can I clarify some things?
|
Hi @efd6, I will say beforehand that I am not very familiar with Elastic (My knowledge is Jamf), so I'm sorry if this is not what you asked for. I finally figured out where to look in Elastic and it seems that almost every time it runs it adds a document with this error: Regarding your questions, I already posted everything that was in the debug log in the original post. |
Thanks @dkdavlar. That's not what I asked for, but it does help. The key part is where is says "no such key: sections". This is referring to this part of the collector in the agent.
It's not finding the In kibana, navigate to the fleet page via the nav menu (at bottom) Then to the agent that is running your Jamf policy (in my case its elastic-agent-40384). There are three tabs, "Agent details", "Logs" and "Diagnostics". In the "Logs" set the logging level to "debug" (bottom of page), let the agent run for a bit (at least collection period) and then in the "Diagnostics" tab request diagnostics and look at the logs in the /logs/data directory in the zip You should be able to find lines like what I've posted below (they will have
The second thing that I'd like to check is what the configuration looks like. In the diagnostic zip you will see the pre-config.yml file. There should be a stanza in the YAML that looks like this (don't post it here, it has secrets — this one is a test instance)
At the bottom you should see the |
Thanks for the guide :D For the first log file I see And from the pre-config: I hope this was what you were looking for. Just adding something I found odd in the debug logs from the agent: No matter how many computers the API call made, it only ever requested the first page. Infact looking in the logs I never saw the "page" paramter used, only the "page-size". But maybe this is just the product of it failing before it starts page 2. |
Do you see any log lines where the state is present, but sections is absent in the state? The page thing is something that I raised with our partners. The design that's used here doesn't use page, instead using the filter. There are some issues with this (obviously). They suggested two possible alternative approaches that we could take to address this. |
No, in all the places where I can find the state, the General section is present: |
So there are no errors like what you show above in the logs in the diagnostic zip? |
Ah yes, there are a few of these:
|
Integration Name
Jamf Pro [jamf_pro]
Dataset Name
inventory
Integration Version
0.1.3
Agent Version
8.15.2
Agent Output Type
elasticsearch
Elasticsearch Version
8.15.2
OS Version and Architecture
Windows Server 2022 Datacenter 21H2 - Build 20348.2849
Software/API Version
Jamf Pro 11.10.2-t1729874551
Error Message
Logs from the agent https://pastebin.com/yvTsuWeL
Event Original
Data does not get imported into Elastic so there is no event.
What did you do?
What did you see?
I see the agent retrieving a bearer token from the Jamf server and using it to request the device inventory. The first page of the inventory is returned, but then it just stops. On some runs, it imports a few inventory records to Elastic.
Debugging logs from the agent https://pastebin.com/yvTsuWeL
What did you expect to see?
I expected it to use pagination to download and import all the devices. We have 3000+ devices, but it only requests the first page, and then nothing more happens in the log.
Anything else?
I have tried to test by enabling and disabling different sections in the inventory section without making a difference. I also tried to tweak the page size.
I can see in the log that the first page is successfully retrieved, confirming that the API client info is correct and has the correct permissions.
The text was updated successfully, but these errors were encountered: