In our environments, we have a standard naming convention for the servers. For example,
Front End servers: AppFE01_CA, AppFE02_NY
Middle tier servers: AppMT01_CA, AppFE09_NY
Back End servers: AppBE01_CA, AppBE08_NY
If the source contains the cpus information for all these servers, how can I use eval, if and like funcation to get avg cpus by group.
This statement works,
sourcetype=serverscpu | eval host = if( host like "AppFE%CA", "FE_CA", "others")| stats avg(CPUs) by host
but multiple like failed, I got invalid eval statement
sourcetype=serverscpu | eval host = if( host like "AppFE%CA", "FE_CA", host like "AppBE%CA" , "BE_CA", "others")
My goal is to get average cpus for front end, middle tier and back end servers by data center in the same graph.
Thanks in advance.
... View more