mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Cloud Security] fix cloud defend error logs (#171278)
This commit is contained in:
parent
7384321533
commit
8f91b39937
1 changed files with 10 additions and 7 deletions
|
@ -205,14 +205,17 @@ const indexHasDataInDateRange = async (
|
|||
cloudSecuritySolution: CloudSecuritySolutions,
|
||||
searchFrom: Date
|
||||
) => {
|
||||
const response = await esClient.search({
|
||||
index: METERING_CONFIGS[cloudSecuritySolution].index,
|
||||
size: 1,
|
||||
_source: false,
|
||||
query: getSearchQueryByCloudSecuritySolution(cloudSecuritySolution, searchFrom),
|
||||
});
|
||||
const response = await esClient.search(
|
||||
{
|
||||
index: METERING_CONFIGS[cloudSecuritySolution].index,
|
||||
size: 1,
|
||||
_source: false,
|
||||
query: getSearchQueryByCloudSecuritySolution(cloudSecuritySolution, searchFrom),
|
||||
},
|
||||
{ ignore: [404] }
|
||||
);
|
||||
|
||||
return response.hits.hits.length > 0;
|
||||
return response.hits?.hits.length > 0;
|
||||
};
|
||||
|
||||
const getSearchStartDate = (lastSuccessfulReport: Date): Date => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue