Skip to main content
GodOfDistroyer
New Member
July 30, 2025
Solved

convertHostNameToIp function is not working, shows validation failed

  • July 30, 2025
  • 2 replies
  • 437 views

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

 

 

Best answer by AEK

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.

2 replies

AEK
SuperUser
AEKAnswer
SuperUser
July 30, 2025

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
GodOfDistroyer
New Member
July 30, 2025

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