Skip to main content
GodOfDistroyer
New Member
Jul 30, 2025 11:43 AM UTC
Solved

convertHostNameToIp function is not working, shows validation failed

Hi Team,

     While I am trying to make a custom parser for Windows/any other device type while using the convertHostNameToIp function with setEventAttribute, validation shows failed.

Full function is below:

<setEventAttribute attr="srcIpAddr">convertHostNameToIp($_saddr)</setEventAttribute>


Below is my custom parser for testing. 

image.png

 

While testing with other functions like 

resolveDNSName


All other functions are working fine except convertHostNameToIp. Please give me any suggestions for this issue.

Below is my custom parser.

Validation failed: convertHostNameToIp
<eventFormatRecognizer>TMSSQLSERVER</eventFormatRecognizer>
<parsingInstructions>
<collectAndSetAttrByKeyValuePair sep=" " src="$_rawmsg">
<attrKeyMap attr="hostName" key="Host: "/>
</collectAndSetAttrByKeyValuePair>
<setEventAttribute attr="srcIpAddr">convertHostNameToIp($hostName)</setEventAttribute>
</parsingInstructions>

Validation is passed: resolveDNSName
<eventFormatRecognizer>TMSSQLSERVER</eventFormatRecognizer>
<parsingInstructions>
<collectAndSetAttrByKeyValuePair sep=" " src="$_rawmsg">
<attrKeyMap attr="hostName" key="Host: "/>
</collectAndSetAttrByKeyValuePair>
<setEventAttribute attr="destIpAddr">resolveDNSName($hostName)</setEventAttribute>
</parsingInstructions>

@AEK, @Toshi_Esumi, @ozkanaltas

 

 

AEK
AEKAnswer
SuperUser
Jul 30, 2025 2:03 PM UTC

Hello

It seems this function is deprecated and should use resolveDNSName instead.

https://docs.fortinet.com/index.php/document/fortisiem/7.3.4/user-guide/962586

Hope it helps.

AEK

2 replies

AEK
SuperUser
AEKAnswer
SuperUser
Jul 30, 2025 2:03 PM UTC

Hello

It seems this function is deprecated and should use resolveDNSName instead.

https://docs.fortinet.com/index.php/document/fortisiem/7.3.4/user-guide/962586

Hope it helps.

Translate
AEK
GodOfDistroyer
New Member
Jul 30, 2025 4:18 PM UTC

Thank you for sharing the solution. Your support is much appreciated

Translate
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024