简体   繁体   English

Newrelic不会显示有关PHP CLI脚本的信息

[英]Newrelic won't show info about php CLI script

In my config /etc/newrelic/nrsysmond.cfg I have: 在我的配置/etc/newrelic/nrsysmond.cfg我有:

license_key=myKeyHash
loglevel=info
logfile=/var/log/newrelic/nrsysmond.log

In my php CLI script I have: 在我的PHP CLI脚本中,我有:

newrelic_background_job(true);
newrelic_set_appname('test');
newrelic_name_transaction('cliTest');

But on newrelic admin web page I see nothing. 但是在newrelic管理网页上,我什么也看不到。
Is it possible to see info about shell scripts in newrelic? 是否有可能在newrelic中看到有关shell脚本的信息?

In my case the problem was that script is worker which continuously works in loop, and for such situations I need explicitly call: 就我而言,问题在于脚本是可以连续循环工作的工作程序,在这种情况下,我需要显式调用:

newrelic_end_transaction();

PS: Thanks Carlos Castro for help! PS:感谢卡洛斯·卡斯特罗(Carlos Castro)的帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM