question

Jason M. avatar image
Jason M. asked ·

How to set PHP custom sensors?

Hi,

Now I am monitoring a PHP application at a customer, This is the first time I configure a PHP app, and I want to add a function as a custom sensor. This is not a object oriented application, how can I set this. Attachments are some screenshots while I was setting this.

PS: In sensor placement configuration UI, I saw that PHP are support hot sensor placement, but when add a custom sensor and then click hot sensor placement, they all skipped, why is this?

Thanks & Regards.

code.txt

sensorphp
php-path-rule.jpg (32.8 KiB)
code.txt (1.5 KiB)
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

1 Answer

Harald Z. avatar image
Harald Z. answered ·

Hi,

the PHP custom sensor is "automatically hot placed". That means, the configuration is sent to the agent after saving. You don't need to click "hot sensor placement". (Clicking hot sensor placement for a java sensor reloads the VM, that's not required in PHP). That means, your changes are active once you click save.

-Harald

2 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Hi Harald,

Thanks for your help, do you know how to set this custom sensor? I did this like the screenshot attached, but take no effect.

0 Likes 0 · ·

The purpose of the path field is not to define the file that's executing the function, but the file where the function is defined! As microtime is a PHP internal function, you should select type "internal".

0 Likes 0 · ·