We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For whatever reason, it is possible to have a new line in the request uri from the php fpm page - from which the exporter crashes.
time="2022-10-04T08:51:07Z" level=error msg="Error scraping PHP-FPM: invalid character '\\n' in string literal" time="2022-10-04T08:51:07Z" level=error msg="invalid character '\\n' in string literal" time="2022-10-04T08:51:07Z" level=error msg="invalid character '\\n' in string literal" time="2022-10-04T08:51:07Z" level=error msg="Pool[tcp://127.0.0.1:9000/status]: {\"pool\":\"www\",\"process manager\":\"static\",\"start time\":1663801373,\"start since\":1072094,\"accepted conn\":670044,\"listen queue\":0,\"max listen queue\":1,\"listen queue len\":511,\"idle processes\":9,\"active processes\":1,\"total processes\":10,\"max active processes\":7,\"max children reached\":0,\"slow requests\":0, \"processes\":[{\"pid\":9,\"state\":\"Running\",\"start time\":1663801373,\"start since\":1072094,\"requests\":67007,\"request duration\":221,\"request method\":\"GET\",\"request uri\":\"/status?json\\u0026full\",\"content length\":0,\"user\":\"-\",\"script\":\"-\",\"last request cpu\":0.00,\"last request memory\":0},{\"pid\":10,\"state\":\"Idle\",\"start time\":1663801373,\"start since\":1072094,\"requests\":66999,\"request duration\":31753,\"request method\":\"-\",\"request uri\":\"-\",\"content length\":0,\"user\":\"-\",\"script\":\"-\",\"last request cpu\":62.99,\"last request memory\":4194304},{\"pid\":11,\"state\":\"Idle\",\"start time\":1663801373,\"start since\":1072094,\"requests\":67009,\"request duration\":23973,\"request method\":\"GET\",\"request uri\":\"-\",\"content length\":0,\"user\":\"-\",\"script\":\"/app/public/index.php\",\"last request cpu\":83.43,\"last request memory\":4194304},{\"pid\":12,\"state\":\"Idle\",\"start time\":1663801374,\"start since\":1072093,\"requests\":66998,\"request duration\":139123,\"request method\":\"POST\",\"request uri\":\"/x/chat/x/event\",\"content length\":69,\"user\":\"-\",\"script\":\"/app/public/index.php\",\"last request cpu\":43.13,\"last request memory\":2097152},{\"pid\":13,\"state\":\"Idle\",\"start time\":1663801374,\"start since\":1072093,\"requests\":67000,\"request duration\":82075,\"request method\":\"POST\",\"request uri\":\"/x/chat/x/event\",\"content length\":69,\"user\":\"-\",\"script\":\"/app/public/index.php\",\"last request cpu\":48.74,\"last request memory\":2097152},{\"pid\":14,\"state\":\"Idle\",\"start time\":1663801374,\"start since\":1072093,\"requests\":67001,\"request duration\":12052,\"request method\":\"OPTIONS\",\"request uri\":\"/x/chat/x/event\",\"content length\":0,\"user\":\"-\",\"script\":\"/app/public/index.php\",\"last request cpu\":82.97,\"last request memory\":2097152},{\"pid\":15,\"state\":\"Idle\",\"start time\":1663801374,\"start since\":1072093,\"requests\":67006,\"request duration\":28325,\"request method\":\"POST\",\"request uri\":\"/api/conversation/v2/selfservice/script/x\n/community/x\",\"content length\":481,\"user\":\"-\",\"script\":\"/app/public/index.php\",\"last request cpu\":70.61,\"last request memory\":2097152},{\"pid\":16,\"state\":\"Idle\",\"start time\":1663801374,\"start since\":1072093,\"requests\":67032,\"request duration\":34741,\"request method\":\"GET\",\"request uri\":\"/x/style/chat\",\"content length\":0,\"user\":\"-\",\"script\":\"/app/public/index.php\",\"last request cpu\":57.57,\"last request memory\":2097152},{\"pid\":17,\"state\":\"Idle\",\"start time\":1663801374,\"start since\":1072093,\"requests\":66991,\"request duration\":31459,\"request method\":\"GET\",\"request uri\":\"/x/sidemenu\",\"content length\":0,\"user\":\"-\",\"script\":\"/app/public/index.php\",\"last request cpu\":63.57,\"last request memory\":2097152},{\"pid\":18,\"state\":\"Idle\",\"start time\":1663801374,\"start since\":1072093,\"requests\":67001,\"request duration\":85281,\"request method\":\"GET\",\"request uri\":\"/chat-script/x/state\",\"content length\":0,\"user\":\"-\",\"script\":\"/app/public/index.php\",\"last request cpu\":58.63,\"last request memory\":4194304}]}"
In one of the requests you see /api/conversation/v2/selfservice/script/x\n/community/x\, which results (unescapted) in
/api/conversation/v2/selfservice/script/x\n/community/x\
/api/conversation/v2/selfservice/script/x /community/x
Obviously this request would've returned an error in PHP/Apache, but I'd say the php-fpm exporter at least shouldn't crash on it.
The text was updated successfully, but these errors were encountered:
Escape all string values in broken json from php-fpm status
f14c0f5
Should fix hipages#258 and hipages#291
c420f28
2c759a2
Successfully merging a pull request may close this issue.
For whatever reason, it is possible to have a new line in the request uri from the php fpm page - from which the exporter crashes.
In one of the requests you see
/api/conversation/v2/selfservice/script/x\n/community/x\
, which results (unescapted) inObviously this request would've returned an error in PHP/Apache, but I'd say the php-fpm exporter at least shouldn't crash on it.
The text was updated successfully, but these errors were encountered: