{"__v":52,"_id":"55d3b64bf77e6d0d00b1b2a7","category":{"__v":6,"_id":"55d3b645f77e6d0d00b1b27b","pages":["55d3b64bf77e6d0d00b1b2a6","55d3b64bf77e6d0d00b1b2a7","55d78faf60fc730d00fc2839","565cc898687b0d0d004101e4","565ccbcdf8bc860d006842ee","56eb25fa450cf10e00de5675","56eb5d051633510e00f884b2"],"project":"55c505b41469ad2500fa2ab7","version":"55d3b644f77e6d0d00b1b273","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-10T18:45:16.066Z","from_sync":false,"order":2,"slug":"agent","title":"Agent"},"parentDoc":null,"project":"55c505b41469ad2500fa2ab7","user":"55c50f4a7c199a2f00665cbf","version":{"__v":6,"_id":"55d3b644f77e6d0d00b1b273","project":"55c505b41469ad2500fa2ab7","createdAt":"2015-08-18T22:48:36.632Z","releaseDate":"2015-08-18T22:48:36.632Z","categories":["55d3b645f77e6d0d00b1b274","55d3b645f77e6d0d00b1b275","55d3b645f77e6d0d00b1b276","55d3b645f77e6d0d00b1b277","55d3b645f77e6d0d00b1b278","55d3b645f77e6d0d00b1b279","55d3b645f77e6d0d00b1b27a","55d3b645f77e6d0d00b1b27b","55d3b645f77e6d0d00b1b27c","55d3b645f77e6d0d00b1b27d","55d7c2939510f00d007ec6fe","56fac9925df15a20002972a2","56fb2f7668e1d30e00a0b672","583498d411e8af2500f6b334","58e52a180ab7b03b00f4a97a"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-10T20:28:00.863Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"## To check the status of agents\n\nClick Servers tab in your account to see status of all the servers with Neptune agents running. \n\n1. If you find a green indicator, it means agent is healthy and registered with Neptune in the last one hour.\n2. If you find a red indicator, it means agent is either not running or your server might have lost network connectivity.\n\nIf you don't see any servers listed even though you installed agents or if you find any errors in the agent logs, please contact our support team by clicking chat window in the lower right corner, or email <support:::at:::neptune.io>\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/iDyhCIxtS1OBSACSHdmi_agent_status.png\",\n        \"agent_status.png\",\n        \"1507\",\n        \"886\",\n        \"#7b1344\",\n        \"\"\n      ],\n      \"caption\": \"Check running agents\"\n    }\n  ]\n}\n[/block]\n## Agent administration on your Linux servers \n\nFor better security, by default Neptune.io agent runs as a daemon (neptune-agentd) under a specific user account called \"neptune\". It never runs as root or a sudo user. \n\nYou can find the agent logs, configuration files etc under 'agent' directory in the agent user's home directory \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo ls -l ~neptune/agent\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n**To find status of agent** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo service neptune-agentd status\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n**To stop the agent** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo service neptune-agentd stop\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n** To start the agent** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo service neptune-agentd start\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n**To stop and restart the agent** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo service neptune-agentd restart\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n**To uninstall the agent and remove it completely**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo service neptune-agentd uninstall\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n**To upgrade the agent to latest version** \n\nJust install the agent with the same one-liner that you have used for fresh installation. It will take care of upgrading the old agent (even if you have old python agent installed, it will be taken care).\n\n## Agent administration on your Mac or OSX servers \n\nFor better security, by default Neptune.io agent runs as a daemon under a specific user account called \"neptune\". It never runs as root or a sudo user. \n\nYou can find the agent logs, configuration files etc under 'agent' directory in the agent user's home directory.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo ls ~neptune/agent\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n** To find status of agent**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo launchctl list |grep neptune\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nYou will find the process ID of the agent com.neptune.agent\n\n** To stop agent **\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo launchctl unload -w /Library/LaunchDaemons/com.neptune.agent.plist\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n** To start agent**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo launchctl load -w /Library/LaunchDaemons/com.neptune.agent.plist\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n** To upgrade agent**\n\nSimply rerun the mac agent installation command and it will take care of upgrade.\n\n** To uninstall agent**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo launchctl unload -w /Library/LaunchDaemons/com.neptune.agent.plist\\nsudo launchctl remove /Library/LaunchDaemons/com.neptune.agent.plist\\n# Remove agent user and related directories\\nsudo dscl . delete /Users/neptuneioagent\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"If you want to give the agent sudo priveleges or restrict it to a few commands, please refer to\",\n  \"body\": \"[Sudo priveleges and control](doc:sudo-priveleges-control) section\"\n}\n[/block]","excerpt":"","slug":"agent-administration","type":"basic","title":"Administration"}
## To check the status of agents Click Servers tab in your account to see status of all the servers with Neptune agents running. 1. If you find a green indicator, it means agent is healthy and registered with Neptune in the last one hour. 2. If you find a red indicator, it means agent is either not running or your server might have lost network connectivity. If you don't see any servers listed even though you installed agents or if you find any errors in the agent logs, please contact our support team by clicking chat window in the lower right corner, or email <support@neptune.io> [block:image] { "images": [ { "image": [ "https://files.readme.io/iDyhCIxtS1OBSACSHdmi_agent_status.png", "agent_status.png", "1507", "886", "#7b1344", "" ], "caption": "Check running agents" } ] } [/block] ## Agent administration on your Linux servers For better security, by default Neptune.io agent runs as a daemon (neptune-agentd) under a specific user account called "neptune". It never runs as root or a sudo user. You can find the agent logs, configuration files etc under 'agent' directory in the agent user's home directory [block:code] { "codes": [ { "code": "sudo ls -l ~neptune/agent", "language": "shell" } ] } [/block] **To find status of agent** [block:code] { "codes": [ { "code": "sudo service neptune-agentd status", "language": "shell" } ] } [/block] **To stop the agent** [block:code] { "codes": [ { "code": "sudo service neptune-agentd stop", "language": "shell" } ] } [/block] ** To start the agent** [block:code] { "codes": [ { "code": "sudo service neptune-agentd start", "language": "shell" } ] } [/block] **To stop and restart the agent** [block:code] { "codes": [ { "code": "sudo service neptune-agentd restart", "language": "shell" } ] } [/block] **To uninstall the agent and remove it completely** [block:code] { "codes": [ { "code": "sudo service neptune-agentd uninstall", "language": "shell" } ] } [/block] **To upgrade the agent to latest version** Just install the agent with the same one-liner that you have used for fresh installation. It will take care of upgrading the old agent (even if you have old python agent installed, it will be taken care). ## Agent administration on your Mac or OSX servers For better security, by default Neptune.io agent runs as a daemon under a specific user account called "neptune". It never runs as root or a sudo user. You can find the agent logs, configuration files etc under 'agent' directory in the agent user's home directory. [block:code] { "codes": [ { "code": "sudo ls ~neptune/agent", "language": "shell" } ] } [/block] ** To find status of agent** [block:code] { "codes": [ { "code": "sudo launchctl list |grep neptune", "language": "shell" } ] } [/block] You will find the process ID of the agent com.neptune.agent ** To stop agent ** [block:code] { "codes": [ { "code": "sudo launchctl unload -w /Library/LaunchDaemons/com.neptune.agent.plist", "language": "shell" } ] } [/block] ** To start agent** [block:code] { "codes": [ { "code": "sudo launchctl load -w /Library/LaunchDaemons/com.neptune.agent.plist", "language": "shell" } ] } [/block] ** To upgrade agent** Simply rerun the mac agent installation command and it will take care of upgrade. ** To uninstall agent** [block:code] { "codes": [ { "code": "sudo launchctl unload -w /Library/LaunchDaemons/com.neptune.agent.plist\nsudo launchctl remove /Library/LaunchDaemons/com.neptune.agent.plist\n# Remove agent user and related directories\nsudo dscl . delete /Users/neptuneioagent", "language": "shell" } ] } [/block] [block:callout] { "type": "info", "title": "If you want to give the agent sudo priveleges or restrict it to a few commands, please refer to", "body": "[Sudo priveleges and control](doc:sudo-priveleges-control) section" } [/block]