{"_id":"custody-probe","_rev":"188-836e89989d4fd073a1539830e935ffbc","name":"custody-probe","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"custody-probe","version":"0.1.0","keywords":["custody","child","process","state","status"],"author":{"name":"Jeff Wear","email":"jeff@mixmax.com"},"license":"MIT","_id":"custody-probe@0.1.0","maintainers":[{"name":"wearhere","email":"jeffreywear@gmail.com"}],"homepage":"https://github.com/mixmaxhq/custody-probe#readme","bugs":{"url":"https://github.com/mixmaxhq/custody-probe/issues"},"dist":{"shasum":"d5e8bddd1f2c076759f4f21b89408c801a7c084d","tarball":"https://registry.npmjs.org/custody-probe/-/custody-probe-0.1.0.tgz","fileCount":6,"integrity":"sha512-4oLFQm5VI4VVScDjNXyK53omTJLacZaONakFcfya2DRODJ58L5UPOagnlik7dQMM+Q3Mj+wIhPVNRkneoR2jbw==","signatures":[{"sig":"MEQCIHY6VfSFm1T2zjOCq1czHotYHW+6aYpBi+9FTQ1mQpxpAiBVrhF6uf77CBobYhJZyHP440M+xERPYJI4rzlpl9KOLA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+5mnCRA9TVsSAnZWagAAOdkP/2dXjXpJZVsu9boNYQe6\nU7OppcDsRXcpfGye0+Ri1iP/4g/jMngr3oj74uGzsP6TRVB0wXTyUDmf3FJs\nIWSu1dCe++X8xjO8ePK1Rji92nhJoNESst3svYs3/4Sto5JrUm3a5ogZGS2I\n9zC1iZ7lVpEZV4WKvg5cSNRatqNvpo/Wn5ORTHQBeOWM9Tkk54x/My5CllvK\nAtoJjuyrbB72teOK+ggIqPhY+cbA/4pOWa2Uq1+MLFjD/1RxoI69ct+0KONU\nxVMLKt6cN4Sw2PSz7NE5rFZN1C79h5iSX3iMRwrtWZmJgXfCZGqQ6SGz+KkR\npfiDddBbnPAHM5YioyutuaUicwlamUee2abcYJxX8PUT2EfUx5aQs8cV9KFh\nhtueIlCdUAelrayhO2PQ+GjkxBUVql32M9sHzM7+rD1f37y5AH1dCs0/vIym\nlZVrOw9y8sViYl7AeA+8On5aRLEjfastDayxvlIO/rvR2ULM8RkUUUkQzYoo\niimlx45FdF2VmNwU6QJy5tVrUiTbDHCk+jmYvPBp3rYPQSCfQZXN3mWFNu9E\n+8XckKORUPYvArS6+uhHRKq0uRztq+75Nnw3C2zuvD2q29C022fSBEEDj5qB\n++BOPJQ0NyazOQP/GxsaocQCCrVmHbs2CmThgoFz0DQ5kA1D7Ym85xmVPlIT\nR7rS\r\n=tITR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","gitHead":"8531c81dd86535fbb5f88293134958d35daa818d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"wearhere","email":"jeffreywear@gmail.com"},"repository":{"url":"git+https://github.com/mixmaxhq/custody-probe.git","type":"git"},"_npmVersion":"6.0.0","description":"Report the state of child processes to custody.","directories":{},"_nodeVersion":"8.9.3","dependencies":{"mkdirp":"^0.5.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/custody-probe_0.1.0_1526438310569_0.006229447068628158","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"custody-probe","version":"0.2.0","keywords":["custody","child","process","state","status"],"author":{"name":"Jeff Wear","email":"jeff@mixmax.com"},"license":"MIT","_id":"custody-probe@0.2.0","maintainers":[{"name":"andytran","email":"hello@andytran.me"},{"name":"bradvogel","email":"bradavogel@gmail.com"},{"name":"chanpory","email":"junk@rith.com"},{"name":"chuy-mixmax","email":"chuy@mixmax.com"},{"name":"gaastonsr","email":"gaastonsr@gmail.com"},{"name":"ghmeier","email":"meier.garret@gmail.com"},{"name":"jerrymiuy","email":"jerry@mixmax.com"},{"name":"jpdstan","email":"stan@mixmax.com"},{"name":"liisa","email":"liisa@mixmax.com"},{"name":"logandavis","email":"logankeahidavis@gmail.com"},{"name":"megantinleywilson","email":"megan@mixmax.com"},{"name":"mericsson","email":"mericsson@gmail.com"},{"name":"mixmax-codeship","email":"admin+mixmax-codeship-npm@mixmax.com"},{"name":"mixmaxryan","email":"ryan@mixmax.com"},{"name":"olofster","email":"olofmathe@hotmail.com"},{"name":"pricj004","email":"pricj004@gmail.com"},{"name":"rchinerman","email":"rchinerman@gmail.com"},{"name":"ryanbrunner","email":"ryan@ryanbrunner.ca"},{"name":"sbalaji1996","email":"srinand@mixmax.com"},{"name":"shils","email":"shil.sinha@gmail.com"},{"name":"skeggse","email":"skeggse@gmail.com"},{"name":"tleavitt","email":"tucker@mixmax.com"},{"name":"ttacon","email":"ttacon@gmail.com"},{"name":"wearhere","email":"jeffreywear@gmail.com"},{"name":"wellcode","email":"ter4444@gmail.com"}],"homepage":"https://github.com/mixmaxhq/custody-probe#readme","bugs":{"url":"https://github.com/mixmaxhq/custody-probe/issues"},"dist":{"shasum":"f174c648c698ca22f6f5bc837ce057bbc48aa077","tarball":"https://registry.npmjs.org/custody-probe/-/custody-probe-0.2.0.tgz","fileCount":6,"integrity":"sha512-V0pSyrYlcDRqytm4+nx1SHJjkmMY+z4Iz7TCfssEj7Vs+9CejZUSbsFK3jY3MQG0D6dyYruQ8FpUHWEtpzQuIQ==","signatures":[{"sig":"MEQCIFAzpWwo4SEM1dFs2HpZC/R5ISODOOv1PD2JJ7ZJpmcxAiBr2DWBFyoeRrHtKbB2DJL0NYS4yobR5bq70NhYkcsCfQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2ncICRA9TVsSAnZWagAARR0P/ijfy5m/FLHAgbfaka1o\nU+2zMrj1t0j7QaDZAe4hZkajxSaUthVSUjAABZZnHrXTE8QInE/hrWIaQCF3\nuG7vQwFN8Y1mJtfGUu37HhdJRXaJEojc1hO2KFkBKYpFI++rOhmqFgpq+pVd\n5DMEvfrbGoi72k1PO//rwDiHht4SwmFRPq5bD3/0jb0zHHRkncDqOpwtdrhZ\nBIe66ZtW1zWeWqtu5fTevuZ3COnxoSO/lKDcI6xAf4CcmE6B58TuOrAa76NC\npcB8Pao8pTWz7BvspEB7YeD1EvBZW1pJBOV2S2DtiL1LmRZhCVJikH6fxv70\n5QYeW+AeSQLLHbU1dYtwKyoPFocqnigCT5baRZylork+TfG0y7DiM+IHZKsV\n8vdameCRd3UhoomcaVHNGpDmtc08rQ6FwdbFVDLF7nFL0j22gJ4VMdi678+c\nHZjZy6W60X/22NX5Y7oaiRZ3JeS/dMtt5mxyYH8XZIZW+9HQ4Ux2jXXgLk96\n925+C6tBSLJauRWPlqCU2Z2C4wtoEbkUefo5uMnEW3Ea/zKxhSbKYc3PB1j6\nYV9aKnCw+GpfZNmNzQpoh2igVR0Chj+5vUjANVzE4h3SzU1LszwGXcy0WISA\nyGTUGByDa+Mr/gtJCRk6UwE+2PAPQwz1cFMY403hPbwk4BnPIGM59I+IjkF4\n3fIn\r\n=lDZO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","gitHead":"1f4ede9952fdd8bd2a591f77a7f5e4f4fba2fb47","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"skeggse","email":"skeggse@gmail.com"},"repository":{"url":"git+https://github.com/mixmaxhq/custody-probe.git","type":"git"},"_npmVersion":"6.0.0","description":"Report the state of child processes to custody.","directories":{},"_nodeVersion":"8.9.3","dependencies":{"mkdirp":"^0.5.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/custody-probe_0.2.0_1539019890632_0.08640051994065301","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-05-16T02:38:30.569Z","modified":"2026-09-30T12:52:44.184Z","0.1.0":"2018-05-16T02:38:30.634Z","0.2.0":"2018-10-08T17:31:30.772Z"},"bugs":{"url":"https://github.com/mixmaxhq/custody-probe/issues"},"author":{"name":"Jeff Wear","email":"jeff@mixmax.com"},"license":"MIT","homepage":"https://github.com/mixmaxhq/custody-probe#readme","keywords":["custody","child","process","state","status"],"repository":{"url":"git+https://github.com/mixmaxhq/custody-probe.git","type":"git"},"description":"Report the state of child processes to custody.","maintainers":[{"email":"mikusdominikcz@gmail.com","name":"mikusd"},{"email":"admin+mixmax-codeship-npm@mixmax.com","name":"mixmax-codeship"},{"email":"jesse@mixmax.com","name":"jessem3"},{"email":"syed.ahmed.anas@gmail.com","name":"ahmed-anas"},{"email":"jordi.salvat.i.alabart@gmail.com","name":"jsalvata"},{"email":"raphael.b.souza@hotmail.com","name":"raphaelbs"},{"email":"it-ops@mixmax.com","name":"mixmax_it"},{"email":"akashbhalla@gmail.com","name":"akashbhalla"},{"email":"jordi.nistal@gmail.com","name":"jordins"},{"email":"amina@mixmax.com","name":"aminao"},{"email":"misterpy@gmail.com","name":"misterpy"},{"email":"pialwlc@gmail.com","name":"mvpia"},{"email":"nirmal@mixmax.com","name":"its-nimo"},{"email":"alexander.k@mixmax.com","name":"kohlhofer_mixmax"},{"email":"jakub@mixmax.com","name":"jtutaj"},{"email":"pedro@mixmax.com","name":"pedro-mixmax"},{"email":"alexander.simovic@gmail.com","name":"simalexan"},{"email":"graham@mixmax.com","name":"grahammixmax"},{"email":"jpdjeredjian@gmail.com","name":"jpdjere"},{"email":"jeffreywear@gmail.com","name":"wearhere"}],"readme":"# custody-probe\n\n`supervisorctl status` reports the state of each process controlled by Supervisor: running, stopped,\nfatally crashed. However it does not display the state of _subprocesses_. This becomes a problem\nwhen using Supervisor for local development of microservices, where the processes launched by\nSupervisor are not the servers themselves but rather build processes, which in turn launch the servers. The process tree might look something like this:\n\n```\nsupervisord\n  - gulp (using gulp-nodemon)\n    - node\n```\n\nIf `node` crashes, `gulp` will remain healthy, and so `supervisorctl status` will fool you into\nthinking that all services are running when they're not.\n\nIf you're using [custody](https://github.com/mixmaxhq/custody) as a front-end to Supervisor, you\ncan fix this by adding a single line of code to your webserver:\n\n```js\nrequire('custody-probe')('app');\n```\n\nNow if the \"app\" webserver crashes, custody will report \"app\" in state \"FATAL\" and will only switch\nback to \"RUNNING\" when the webserver comes back up.\n\n## Installation\n\n```sh\nnpm install --dev custody-probe\n```\n\n## Usage\n\n```js\nif (process.env.NODE_ENV === 'development') {\n  require('custody-probe')('NAME_OF_PROGRAM');\n}\n```\n\nIf you've installed this as a dev dependency (recommended) you'll need to restrict it to running\nin your development environment, as shown using `process.env.NODE_ENV`.\n\nThe argument to custody-probe is the name of the Supervisor program to which this Node process\nbelongs. Find the name of the program in your `supervisord.conf` file like `[program:NAME_OF_PROGRAM]`.\n\n(The program name is _usually_ what's shown in the `name` column of `supervisorctl status` and\n`custody`, too, except if you have associated the program with a Supervisor group, in which case\nthe column will read `NAME_OF_GROUP:NAME_OF_PROGRAM`.)\n\nWe recommend you add the probe to only **1 (one) process** controlled by each program, since as of\nv1.0.0 custody only has support for displaying one process' state (in addition to what Supervisor\nreports normally). If you add the probe to more processes within the same program, the states will\noverwrite each other.\n\n## Configuration\n\nBy default, custody uses `/usr/local/var/custody` to store information and to enable probe->custody communication. You can override this directory by specifying the `CUSTODY_PROC_DIR` environment variable.\n\n## Contributing\n\nWe welcome bug reports and feature suggestions!\n","readmeFilename":"README.md"}