Project and Portfolio Management Practitioners Forum
cancel

How to get the Hostname token

SOLVED
Go to solution
Highlighted
TurboMan
Honored Contributor.

How to get the Hostname token

Hi,

 

Is there any token which gives me the hostname where the PPM is installed?

Just the server name.

I've found something as [AS.BASE_URL], but this gives me the URL (hostname+port+init_page)

 

Any help is appreciated

 

Regards

T.M.

 

6 REPLIES
Erik Cole
Acclaimed Contributor.

Re: How to get the Hostname token

[AS.SERVER_NAME] ?

TurboMan
Honored Contributor.

Re: How to get the Hostname token

Thanks,

 

But, it is node name not the hostname.

I've gone through most of the application tokens, but no good.

Maybe, there is no such a token or I might be missing.

 

Jason Nichols K
Acclaimed Contributor.
Solution

Re: How to get the Hostname token

T.M.,

You should have an Environment defined for your PPM environment, usually called KINTANA_SERVER. If that's properly configured, you can get use [ENV="KINTANA_SERVER".SERVER_NAME].
Jim Esler
Acclaimed Contributor.

Re: How to get the Hostname token

Another approach would be to ask the server what its name is. Something like this should work:

 

ksc_local_exec hostname

 

I am assuming here that you are running nodes on more than one server and the kintana_server environment lists only the primary node.

Deep Mehta
Respected Contributor.

Re: How to get the Hostname token

I have found the same issue in clustered enviornments.

 

Perhaps you can try this if you are using a command line: 

 

ksc_itg_run_sql QUERY_STRING="SELECT VALUE  FROM knta_app_server_properties WHERE KEY = 'PRIMARY_BASE_URL''"

Use SUBSTR for exact host name

and then use [SQL_OUTPUT] token to fetch the value via token. 

 

Alternatively, you can also try 'localhost' like http://localhost:[AS.HTTP_PORT] in a ksc_local_exec command

 

 

Thanks, 

Kuldeep

TurboMan
Honored Contributor.

Re: How to get the Hostname token

Thanks all,

 

Since I am going to use it in mails, only token solution is the remedy.

If I use [ENV="SERVERNAME IN ENVONMENT".SERVER_NAME] solves my problem.

 

Regards

T.M.