Closed solarmon closed 3 years ago
The X-Homer-Search header is shown in the parsed SIP headers for the INVITE:
If I try to search for 'blank' in the search form using the "X-Homer-Search" field, it does not return any results:
"sid_type": true
should be removed.
I have removed it, and I also tried setting 'hide' to false:
{
"id": "protocol_header.CustomHeader",
"name": "X-Homer-Search",
"type": "string",
"index": "none",
"form_type": "input",
"position": 24,
"skip": false,
"hide": false
}
But this did not seem to make any difference.
please go to Details tab and show us the all records what you can see.
In the Details tab, I don't see the custom header:
this means it has been not extracted. You have to check your heplify-server.toml
Where do I check that? As stated already, this Homer 7 setup is built using https://github.com/sipcapture/homer7-docker and I've only had to configure/edit the docker-compose.yml file.
I can get in to the heplify-server docker image, but where is the heplify-server.toml file?
My understanding is that in this docker based setup it will use the environment variables for the configuration? If I check the environment variables on the heplify-server docker image, I do see:
HEPLIFYSERVER_CUSTOMHEADER=["X-Homer-Search"]
@lmangani I am not sure, but will be this env param converted to CustomHeader ?
Try the following instead, since its a single value:
- "HEPLIFYSERVER_CUSTOMHEADER=X-Homer-Search"
Try the following instead, since its a single value:
- "HEPLIFYSERVER_CUSTOMHEADER=X-Homer-Search"
The example was just with a single header just to do a proof of concept. Potentially I would want to search on multiple custom headers.
Anyway, I did as suggested, and reloaded heplify-server with docker-compose up -d
but I still don't see the header in the Details tab.
How can I check on the heplify-server docker image, other than the environment variables, what configuration it is using? How can we be sure that HEPLIFYSERVER_CUSTOMHEADER
is converted to CustomHeader
and used by heplify-server?
so, found. This is multiconfig and it should proceed without any problem
https://github.com/negbie/multiconfig/blob/master/env.go#L55
@solarmon can you run heplify-server without docker just to be sure that it parses everything that you need ?
uppercase(parameter) = ENV and it should work just fine with a single value or an array.
Your next option is to create a custom .toml config file and mount it on the image instead of using the ENV variables.
In my last comment, I was looking at an existing SIP INVITE. I made a new call, the I actually do now see the header listed in Details:
(I will have to revert to original format, and check with new calls, but I thought I did look at new calls).
That's definitely a step forward! But the search still does not seem to work.
So I did a bit more testing, and I can get it to show more than one custom header in Details:
I used the following in docker-compose.yml:
- "HEPLIFYSERVER_CUSTOMHEADER=X-Homer-Search,X-Homer-Search2"
So, I didn't have to use the brackets, or quote marks.
But I still can't figure out how to get it to search on these custom headers.
great. Now can you please see which sql query your search generated ?
your ID should be data_header.X-Homer-Search
{
"id": "data_header.X-Homer-Search",
"name": "X-Homer-Search",
"type": "string",
"index": "none",
"form_type": "input",
"position": 24,
"skip": false,
"hide": false
}
OK, I changed it to what you have suggested.
Initially, it didn't seem to work.
When I looked at the search settings it was like:
I pressed 'Save' and it presented the correct Active list, and I selected and made 'X-Homer-Search' Active.
Now the search is working!
Thank you so much. Now I've got the correct steps and configuration to add other custom headers for searching.
Perfect! Now time for payback! :-) Can you please document it and we will add it to WIKI ? ;-)
Hi. I have created my own notes in Evernote. I'm not sure whether it is good enough for you to use in your Wiki, but it is here:
Thank you so much! We will work on it!
Hi,
As discussed in the Gitter channel, I would like to figure out how I can configure the Homer 7 web GUI to allow me to search based on custom headers.
Please note that my Homer 7 setup is from https://github.com/sipcapture/homer7-docker so this may important when talking about where configurations are.
On the Gitter channel I was given some links, but I was struggling to understand how to put it all together:
https://github.com/sipcapture/homer-app/wiki/Examples:-Correlation-MAPPING#correlation-id-correlation---graphing-all-calls-with-the-same-correlation-id- https://github.com/sipcapture/heplify-server/blob/master/example/homer7_config/heplify-server.toml#L64
In this example, I want to be able to search on a custom header call "X-Homer-Search".
This is what I have done so far:
- "HEPLIFYSERVER_CUSTOMHEADER=[\"X-Homer-Search\"]"
HEPLIFYSERVER_CUSTOMHEADER=["X-Homer-Search"]
Please advise what I am doing wrong, or if there is any other steps or checks I should/could do.
Thank you.